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'.
This commit is contained in:
parent
88036251eb
commit
5556865893
|
@ -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
|
;; Deactivate `org-agenda-entry-text-mode' when filtering
|
||||||
(if org-agenda-entry-text-mode (org-agenda-entry-text-mode))
|
(if org-agenda-entry-text-mode (org-agenda-entry-text-mode))
|
||||||
(let (tags cat txt)
|
(let (tags cat txt)
|
||||||
(setq org-agenda-filter-form
|
(setq org-agenda-filter-form (org-agenda-filter-make-matcher filter type))
|
||||||
(org-agenda-filter-make-matcher filter type))
|
;; Only set `org-agenda-filtered-by-category' to t when a unique
|
||||||
(if (and (eq type 'category)
|
;; category is used as the filter:
|
||||||
(not (equal (substring (car filter) 0 1) "-")))
|
(setq org-agenda-filtered-by-category
|
||||||
;; Only set `org-agenda-filtered-by-category' to t
|
(and (eq type 'category)
|
||||||
;; when a unique category is used as the filter
|
(not (equal (substring (car filter) 0 1) "-"))))
|
||||||
(setq org-agenda-filtered-by-category t))
|
|
||||||
(org-agenda-set-mode-name)
|
(org-agenda-set-mode-name)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
Loading…
Reference in New Issue