org-agenda-filter-by-tag: Only accept existing tags

* org-agenda.el (org-agenda-filter-by-tag): Pass t for the
require-match argument of completing-read because the collection
includes all valid tags.

In addition to preventing a user from filtering on a value that
doesn't match any entries, this makes the default Emacs completion
more convenient because a tag can be selected by entering its unique
prefix.
This commit is contained in:
Nathaniel Flath 2017-07-12 17:15:04 -07:00 committed by Kyle Meyer
parent 8d9854ca8a
commit 404ac42ee5
1 changed files with 1 additions and 1 deletions

View File

@ -7597,7 +7597,7 @@ also press `-' or `+' to switch between filtering and excluding."
(org-global-tags-completion-table)))
(let ((completion-ignore-case t))
(setq tag (completing-read
"Tag: " org-global-tags-completion-table))))
"Tag: " org-global-tags-completion-table nil t))))
(cond
((eq char ?\r)
(org-agenda-filter-show-all-tag)