diff options
author | Gustav Wikström <gustav.erik@gmail.com> | 2013-06-27 17:44:50 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-06-27 17:44:50 +0200 |
commit | edcf9c95eb6f7ff9b844e7052b07933f8ffc5481 (patch) | |
tree | cd6d9e875deb1c0fff6c898ad045580742e5d154 | |
parent | b0059198c31b6454995fef50115636744565230e (diff) | |
download | org-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.el | 15 |
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." |