Bug fix in tags filter: Treat SPC selection correctly.

* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Fix
filtering for any tag at all.
This commit is contained in:
Carsten Dominik 2019-09-07 14:48:43 +02:00
parent 5bd71d3052
commit 711852ec67
2 changed files with 6 additions and 5 deletions

View File

@ -9033,8 +9033,8 @@ the estimated effort of an entry (see [[*Effort Estimates]]).
#+vindex: org-agenda-effort-filter-preset #+vindex: org-agenda-effort-filter-preset
#+vindex: org-agenda-regexp-filter-preset #+vindex: org-agenda-regexp-filter-preset
Agenda built-in or custom commands are statically defined. Agenda Agenda built-in or custom commands are statically defined. Agenda
filters and limits provide allow to flexibly narrow down the list of filters and limits allow to flexibly narrow down the list of agenda
agenda entries. entries.
/Filters/ only change the visibility of items, are very fast and are /Filters/ only change the visibility of items, are very fast and are
mostly used interactively[fn:96]. You can switch quickly between mostly used interactively[fn:96]. You can switch quickly between
@ -9073,7 +9073,7 @@ filter elements are accumulated.
command then hides all entries that do not contain or inherit this command then hides all entries that do not contain or inherit this
tag. Pressing {{{kbd(+)}}} or {{{kbd(-)}}} at the prompt switches tag. Pressing {{{kbd(+)}}} or {{{kbd(-)}}} at the prompt switches
between filtering for and against the next tag. To clear the between filtering for and against the next tag. To clear the
filter, press {{{kbd(\)}}} at the prompt. filter, call the command again and press {{{kbd(\)}}} at the prompt.
- {{{kbd(<)}}} (~org-agenda-filter-by-category~) :: - {{{kbd(<)}}} (~org-agenda-filter-by-category~) ::
@ -9111,7 +9111,8 @@ filter elements are accumulated.
larger-or-equal than the selected value. For application of the larger-or-equal than the selected value. For application of the
operator, entries without a defined effort are treated according to operator, entries without a defined effort are treated according to
the value of ~org-sort-agenda-noeffort-is-high~. To clear the the value of ~org-sort-agenda-noeffort-is-high~. To clear the
filter, press {{{kbd(_)}}} again at the operator prompt. filter, call the command again and press {{{kbd(_)}}} again at the
operator prompt.
- {{{kbd(^)}}} (~org-agenda-filter-by-top-headline~) :: - {{{kbd(^)}}} (~org-agenda-filter-by-top-headline~) ::

View File

@ -7912,7 +7912,7 @@ function to set the right switches in the returned form."
(dolist (x tags (cons (if (eq op ?-) 'and 'or) form)) (dolist (x tags (cons (if (eq op ?-) 'and 'or) form))
(let* ((tag (substring x 1)) (let* ((tag (substring x 1))
(f (cond (f (cond
((string= "" tag) '(not tags)) ((string= "" tag) 'tags)
((and (string-match-p "\\`{" tag) (string-match-p "}\\'" tag)) ((and (string-match-p "\\`{" tag) (string-match-p "}\\'" tag))
;; TAG is a regexp. ;; TAG is a regexp.
(list 'org-match-any-p (substring tag 1 -1) 'tags)) (list 'org-match-any-p (substring tag 1 -1) 'tags))