소스 검색

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".
Ihor Radchenko 4 년 전
부모
커밋
75ccb9719f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lisp/org-agenda.el

+ 2 - 2
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))