diff options
author | Bastien Guerry <bzg@altern.org> | 2014-05-26 14:55:50 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-05-26 14:55:50 +0200 |
commit | 54ab137689682d967a90e509af1febbc9e192dae (patch) | |
tree | 0de108d53bb837378512f8f0a440ca12f2811f37 | |
parent | 061904b58ee8af2360102121edb44e079c2ef2ac (diff) | |
download | org-mode-54ab137689682d967a90e509af1febbc9e192dae.tar.gz |
Fix bug when update timestamps on filtered agenda entries
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.
* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.
Thanks to Thomas Morgan for reporting this.
-rw-r--r-- | lisp/org-agenda.el | 9 | ||||
-rw-r--r-- | lisp/org-compat.el | 17 |
2 files changed, 8 insertions, 18 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 7d996e1..f183728 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2159,7 +2159,8 @@ The following commands are available: org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode org-agenda-show-log org-agenda-start-with-log-mode)) - + (add-to-invisibility-spec '(org-filtered)) + (add-to-invisibility-spec '(org-link)) (easy-menu-change '("Agenda") "Agenda Files" (append @@ -7652,7 +7653,7 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags." (e (point-at-eol))) (let ((inhibit-read-only t)) (add-text-properties - b e `(invisible t org-filtered t org-filter-type ,type))))) + b e `(invisible org-filtered org-filter-type ,type))))) (defun org-agenda-remove-filter (type) (interactive) @@ -7664,7 +7665,7 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags." (goto-char pos) (remove-text-properties (point) (next-single-property-change (point) 'org-filter-type) - `(invisible t org-filter-type ,type)))) + `(invisible org-filtered org-filter-type ,type)))) (set (intern (format "org-agenda-%s-filter" (intern-soft type))) nil) (setq org-agenda-filter-form nil) (org-agenda-set-mode-name) @@ -9153,7 +9154,7 @@ Called with a universal prefix arg, show the priority instead of setting it." (add-text-properties (1- (point)) (point-at-eol) (list 'display (org-add-props stamp nil - 'face 'secondary-selection)))) + 'face '(secondary-selection default))))) (beginning-of-line 1)) (beginning-of-line 0))))) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 70c41d5..90380a8 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -312,8 +312,7 @@ Works on both Emacs and XEmacs." (defun org-in-invisibility-spec-p (arg) "Is ARG a member of `buffer-invisibility-spec'?" (if (consp buffer-invisibility-spec) - (member arg buffer-invisibility-spec) - nil)) + (member arg buffer-invisibility-spec))) (defmacro org-xemacs-without-invisibility (&rest body) "Turn off extents with invisibility while executing BODY." @@ -347,18 +346,8 @@ Works on both Emacs and XEmacs." "Move to column COLUMN. Pass COLUMN and FORCE to `move-to-column'. Pass BUFFER to the XEmacs version of `move-to-column'." - (let* ((with-bracket-link - (save-excursion - (forward-line 0) - (looking-at (concat "^.*" org-bracket-link-regexp)))) - (buffer-invisibility-spec - (cond - ((or (not (derived-mode-p 'org-mode)) - (and with-bracket-link (org-invisible-p2))) - (remove '(org-link) buffer-invisibility-spec)) - (with-bracket-link - (remove t buffer-invisibility-spec)) - (t buffer-invisibility-spec)))) + (let ((buffer-invisibility-spec + (remove '(org-filtered) buffer-invisibility-spec))) (if (featurep 'xemacs) (org-xemacs-without-invisibility (move-to-column column force buffer)) |