Browse Source

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 2 years ago
parent
commit
920cfbd921
1 changed files with 2 additions and 2 deletions
  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