summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhor Radchenko <yantar92@gmail.com>2021-02-11 12:03:15 +0800
committerKyle Meyer <kyle@kyleam.com>2021-02-15 00:50:05 -0500
commit75ccb9719fc0d6822e7e69e9d3079f884cfb96ea (patch)
treee0361e584d9042097cdce4ca00f9ee77db970ed1
parent61336f80dc94a442842289d2f33f91190383e9b2 (diff)
downloadorg-mode-75ccb9719fc0d6822e7e69e9d3079f884cfb96ea.tar.gz
Allow tags containing capital letters in org-agenda-filter
* lisp/org-agenda.el (org-agenda-filter): Downcase tags in the search string provided by user. This is needed because all the tags stored in 'tags text property are downcased. Example when old code did not work is a tag like COMMON. The user would not expect a need to input +|-common in the agenda filter instead of +|-COMMON. The latter would only result in "COMMON filter ignored because tag/category is not represented".
-rw-r--r--lisp/org-agenda.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dedf7e5..3f311c7 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7767,8 +7767,8 @@ the variable `org-agenda-auto-exclude-function'."
(setq s (replace-regexp-in-string ; Remove the temporary special string.
"~~~" "-" (match-string 3 f-string)))
(cond
- ((member s tag-list)
- (add-to-list 'ft (concat pm s) 'append 'equal))
+ ((member (downcase s) tag-list)
+ (add-to-list 'ft (concat pm (downcase s)) 'append 'equal))
((member s category-list)
(add-to-list 'fc (concat pm ; Remove temporary double quotes.
(replace-regexp-in-string "\"\\(.*\\)\"" "\\1" s))