summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2019-08-20 17:58:31 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2019-08-20 17:58:31 +0200
commit96cc762ff3ef9bf71d8d19e1a2fa82a0aa745a74 (patch)
tree8a1df227bb430f5817fd21a910aad19c6e522396
parentf3474724ad5cbee318df1f38d67d175652958567 (diff)
downloadorg-mode-96cc762ff3ef9bf71d8d19e1a2fa82a0aa745a74.tar.gz
Remove duplicate selection letters from tag filter prompt.
* lisp/org-agenda.el (org-agenda-filter-by-tag): Remove duplicate selection letters from tag filter prompt. If tag groups were the same in multiple agenda files, the selection characters would be repeated in the prompt.
-rw-r--r--lisp/org-agenda.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 75f7ce4..c446f15 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7562,10 +7562,14 @@ should be used to exclude the search - the interactive user can
also press `-' or `+' to switch between filtering and excluding."
(interactive "P")
(let* ((alist org-tag-alist-for-agenda)
+ (seen-chars nil)
(tag-chars (mapconcat
(lambda (x) (if (and (not (symbolp (car x)))
- (cdr x))
- (char-to-string (cdr x))
+ (cdr x)
+ (not (member (cdr x) seen-chars)))
+ (progn
+ (push (cdr x) seen-chars)
+ (char-to-string (cdr x)))
""))
org-tag-alist-for-agenda ""))
(valid-char-list (append '(?\t ?\r ?/ ?. ?\s ?q)