summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-05-23 13:43:18 +0200
committerBastien Guerry <bzg@altern.org>2014-05-23 13:43:18 +0200
commit0f0fa81dd0f2785b62a77a65fc569ebdfb9ba020 (patch)
tree37cf0593481c70b32b72d3045a045ff23a274bb6
parent7384c96954409e00d6f1590cef4d0e082fc34443 (diff)
parent1d57e1ac9ae5e7ddefe0b63a23728a241d3d99cb (diff)
downloadorg-mode-0f0fa81dd0f2785b62a77a65fc569ebdfb9ba020.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-agenda.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 95c0adb..37cc3eb 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7661,17 +7661,18 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags."
(defun org-agenda-remove-filter (type)
(interactive)
"Remove filter of type TYPE from the agenda buffer."
- (goto-char (point-min))
- (let ((inhibit-read-only t) pos)
- (while (setq pos (text-property-any (point) (point-max) 'org-filter-type type))
- (goto-char pos)
- (remove-text-properties
- (point) (next-single-property-change (point) 'org-filter-type)
- `(invisible t 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)
- (org-agenda-finalize))
+ (save-excursion
+ (goto-char (point-min))
+ (let ((inhibit-read-only t) pos)
+ (while (setq pos (text-property-any (point) (point-max) 'org-filter-type type))
+ (goto-char pos)
+ (remove-text-properties
+ (point) (next-single-property-change (point) 'org-filter-type)
+ `(invisible t 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)
+ (org-agenda-finalize)))
(defun org-agenda-filter-show-all-tag nil
(org-agenda-remove-filter 'tag))