diff options
Diffstat (limited to 'lisp/org/org-colview.el')
-rw-r--r-- | lisp/org/org-colview.el | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 5a59196baa1..8790ad45fb1 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -36,7 +36,7 @@ (declare-function org-clock-sum-today "org-clock" (&optional headline-filter)) (when (featurep 'xemacs) - (error "Do not load this file into XEmacs, use `org-colview-xemacs.el'")) + (error "Do not load this file into XEmacs, use `org-colview-xemacs.el' from the contrib/ directory")) ;;; Column View @@ -169,8 +169,10 @@ This is the compiled version of the format.") (get-text-property (point-at-bol) 'face)) 'default)) (color (list :foreground (face-attribute ref-face :foreground))) - (face (list color 'org-column ref-face)) - (face1 (list color 'org-agenda-column-dateline ref-face)) + (font (list :height (face-attribute 'default :height) + :family (face-attribute 'default :family))) + (face (list color font 'org-column ref-face)) + (face1 (list color font 'org-agenda-column-dateline ref-face)) (cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp)) pom property ass width f string ov column val modval s2 title calc) ;; Check if the entry is in another buffer. @@ -223,7 +225,7 @@ This is the compiled version of the format.") (setq s2 (org-columns-add-ellipses (or modval val) width)) (setq string (format f s2)) ;; Create the overlay - (org-unmodified + (org-with-silent-modifications (setq ov (org-columns-new-overlay beg (setq beg (1+ beg)) string (if dateline face1 face))) (overlay-put ov 'keymap org-columns-map) @@ -332,7 +334,7 @@ for the duration of the command.") (remove-hook 'post-command-hook 'org-columns-hscoll-title 'local)) (move-marker org-columns-begin-marker nil) (move-marker org-columns-top-level-marker nil) - (org-unmodified + (org-with-silent-modifications (mapc 'delete-overlay org-columns-overlays) (setq org-columns-overlays nil) (let ((inhibit-read-only t)) @@ -384,7 +386,7 @@ CPHR is the complex heading regexp to use for parsing ITEM." (defun org-columns-quit () "Remove the column overlays and in this way exit column editing." (interactive) - (org-unmodified + (org-with-silent-modifications (org-columns-remove-overlays) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) '(read-only t)))) @@ -488,7 +490,7 @@ Where possible, use the standard interface for changing this line." (org-agenda-columns))) (t (let ((inhibit-read-only t)) - (org-unmodified + (org-with-silent-modifications (remove-text-properties (max (point-min) (1- bol)) eol '(read-only t))) (unwind-protect @@ -589,9 +591,9 @@ an integer, select that value." (if (= nth -1) (setq nth 9))) (when (equal key "ITEM") (error "Cannot edit item headline from here")) - (unless (or allowed (member key '("SCHEDULED" "DEADLINE"))) + (unless (or allowed (member key '("SCHEDULED" "DEADLINE" "CLOCKSUM"))) (error "Allowed values for this property have not been defined")) - (if (member key '("SCHEDULED" "DEADLINE")) + (if (member key '("SCHEDULED" "DEADLINE" "CLOCKSUM")) (setq nval (if previous 'earlier 'later)) (if previous (setq allowed (reverse allowed))) (cond @@ -920,7 +922,7 @@ Don't set this, this is meant for dynamic scoping.") (defun org-columns-compute-all () "Compute all columns that have operators defined." - (org-unmodified + (org-with-silent-modifications (remove-text-properties (point-min) (point-max) '(org-summaries t))) (let ((columns org-columns-current-fmt-compiled) (org-columns-time (time-to-number-of-days (current-time))) @@ -996,7 +998,7 @@ Don't set this, this is meant for dynamic scoping.") (if (assoc property sum-alist) (setcdr (assoc property sum-alist) useval) (push (cons property useval) sum-alist) - (org-unmodified + (org-with-silent-modifications (add-text-properties sumpos (1+ sumpos) (list 'org-summaries sum-alist)))) (when (and val (not (equal val (if flag str val)))) @@ -1058,8 +1060,7 @@ Don't set this, this is meant for dynamic scoping.") ((memq fmt '(estimate)) (org-estimate-print n printf)) ((not (numberp n)) "") ((memq fmt '(add_times max_times min_times mean_times)) - (let* ((h (floor n)) (m (floor (+ 0.5 (* 60 (- n h)))))) - (format org-time-clocksum-format h m))) + (org-hours-to-clocksum-string n)) ((eq fmt 'checkbox) (cond ((= n (floor n)) "[X]") ((> n 1.) "[-]") @@ -1305,10 +1306,10 @@ PARAMS is a property list of parameters: (if (eq 'hline x) x (cons "" x))) tbl)) (setq tbl (append tbl (list (cons "/" (make-list nfields "<>")))))) - (setq pos (point)) (when content-lines (while (string-match "^#" (car content-lines)) (insert (pop content-lines) "\n"))) + (setq pos (point)) (insert (org-listtable-to-string tbl)) (when (plist-get params :width) (insert "\n|" (mapconcat (lambda (x) (format "<%d>" (max 3 x))) @@ -1404,7 +1405,7 @@ and tailing newline characters." ;; OK, the property is not defined. Use appointment duration? (when (and org-agenda-columns-add-appointments-to-effort-sum (setq d (get-text-property (point) 'duration))) - (setq d (org-minutes-to-hh:mm-string d)) + (setq d (org-minutes-to-clocksum-string d)) (put-text-property 0 (length d) 'face 'org-warning d) (push (cons org-effort-property d) p))) (push (cons (org-current-line) p) cache)) @@ -1510,9 +1511,8 @@ This will add overlays to the date lines, to show the summary for each day." (save-excursion (save-restriction (widen) - (org-unmodified - (remove-text-properties (point-min) (point-max) - '(org-summaries t))) + (org-with-silent-modifications + (remove-text-properties (point-min) (point-max) '(org-summaries t))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) |