瀏覽代碼

org-agenda: Fix agenda filter by empty tag string

* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Handle
  empty tag strings.

Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107121>
Nicolas Goaziou 9 年之前
父節點
當前提交
920cfbd921
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/org-agenda.el

+ 2 - 2
lisp/org-agenda.el

@@ -7625,8 +7625,8 @@ switches in the returned form."
   (let (f f1) ;f = return expression. f1 = working-area
     (dolist (x tags)
       (let* ((tag (substring x 1))
-	     (isregexp (and (equal "{" (substring tag 0 1))
-			    (equal "}" (substring tag -1))))
+	     (isregexp (and (org-string-match-p "\\`{" tag)
+			    (org-string-match-p "}\\'" tag)))
 	     regexp)
 	(cond
 	 (isregexp