summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-06-16 09:41:14 (GMT)
committer Bastien Guerry <bzg@altern.org>2014-06-16 09:41:14 (GMT)
commit5556865893bd64b3df928968875e08df97ca6b44 (patch)
tree72917725a7e028fde257c2008651f4d31645985d
parent88036251eb09e4b756ffedcfb7d9b767d8cefec8 (diff)
downloadorg-mode-5556865893bd64b3df928968875e08df97ca6b44.zip
org-mode-5556865893bd64b3df928968875e08df97ca6b44.tar.gz
org-agenda.el (org-agenda-filter-apply): Fix setting of `org-agenda-filtered-by-category'
* org-agenda.el (org-agenda-filter-apply): Fix setting of `org-agenda-filtered-by-category'.
-rw-r--r--lisp/org-agenda.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index df4ce9b..42d62f3 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7604,13 +7604,12 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags."
;; Deactivate `org-agenda-entry-text-mode' when filtering
(if org-agenda-entry-text-mode (org-agenda-entry-text-mode))
(let (tags cat txt)
- (setq org-agenda-filter-form
- (org-agenda-filter-make-matcher filter type))
- (if (and (eq type 'category)
- (not (equal (substring (car filter) 0 1) "-")))
- ;; Only set `org-agenda-filtered-by-category' to t
- ;; when a unique category is used as the filter
- (setq org-agenda-filtered-by-category t))
+ (setq org-agenda-filter-form (org-agenda-filter-make-matcher filter type))
+ ;; Only set `org-agenda-filtered-by-category' to t when a unique
+ ;; category is used as the filter:
+ (setq org-agenda-filtered-by-category
+ (and (eq type 'category)
+ (not (equal (substring (car filter) 0 1) "-"))))
(org-agenda-set-mode-name)
(save-excursion
(goto-char (point-min))