summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-06-27 15:45:35 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-06-27 15:45:35 (GMT)
commit85edec188612928a270e3af92c5f0c0bae9b0fec (patch)
treef7e044554b7f83fd5c19021b85e88ac3b791aab3
parent4a704a77ffb1399538c9527da592ecf24629517f (diff)
parentedcf9c95eb6f7ff9b844e7052b07933f8ffc5481 (diff)
downloadorg-mode-85edec188612928a270e3af92c5f0c0bae9b0fec.zip
org-mode-85edec188612928a270e3af92c5f0c0bae9b0fec.tar.gz
Merge branch 'maint'
-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 ca9bbe1..e8f374d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7308,12 +7308,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."