Bläddra i källkod

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.
Nathaniel Flath 7 år sedan
förälder
incheckning
404ac42ee5
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      lisp/org-agenda.el

+ 1 - 1
lisp/org-agenda.el

@@ -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)