summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustav Wikström <gustav.erik@gmail.com>2013-06-27 17:44:50 +0200
committerBastien Guerry <bzg@altern.org>2013-06-27 17:44:50 +0200
commitedcf9c95eb6f7ff9b844e7052b07933f8ffc5481 (patch)
treecd6d9e875deb1c0fff6c898ad045580742e5d154
parentb0059198c31b6454995fef50115636744565230e (diff)
downloadorg-mode-edcf9c95eb6f7ff9b844e7052b07933f8ffc5481.tar.gz
org-agenda.el (org-agenda-filter-by-category): Display all filtered out categories
* org-agenda.el (org-agenda-filter-by-category): Display all filtered out categories. TINYCHANGE
-rw-r--r--lisp/org-agenda.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 75a51ec..87c1243 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7307,12 +7307,15 @@ The category is that of the current line."
org-agenda-category-filter)
(org-agenda-filter-show-all-cat)
(let ((cat (org-no-properties (get-text-property (point) 'org-category))))
- (if (and cat (not (string= "" cat)))
- (org-agenda-filter-apply
- (setq org-agenda-category-filter
- (list (concat (if strip "-" "+") cat)))
- 'category)
- (error "No category at point")))))
+ (cond
+ ((and cat strip)
+ (org-agenda-filter-apply
+ (push (concat "-" cat) org-agenda-category-filter) 'category))
+ ((and cat)
+ (org-agenda-filter-apply
+ (setq org-agenda-category-filter
+ (list (concat "+" cat))) 'category))
+ ((error "No category at point"))))))
(defun org-find-top-headline (&optional pos)
"Find the topmost parent headline and return it."