فهرست منبع

Allow "" to be a match in property searches for empty and undefined value.

Carsten Dominik 17 سال پیش
والد
کامیت
a4fa054241
2فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 5 0
      ChangeLog
  2. 2 2
      org.el

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-02-12  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.el (org-make-tags-matcher): Allow "" to match an empty or
+	non-existent property value.
+
 2008-02-12  Bastien Guerry  <bzg@altern.org>
 
 	* org.el (org-export-as-html): Use :html-extension instead of

+ 2 - 2
org.el

@@ -15332,7 +15332,7 @@ also TODO lines."
 
   ;; Parse the string and create a lisp form
   (let ((match0 match)
-	(re (org-re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL=\\([0-9]+\\)\\|\\([[:alnum:]_]+\\)=\\({[^}]+}\\|\"[^\"]+\"\\)\\|[[:alnum:]_@]+\\)"))
+	(re (org-re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL=\\([0-9]+\\)\\|\\([[:alnum:]_]+\\)=\\({[^}]+}\\|\"[^\"]*\"\\)\\|[[:alnum:]_@]+\\)"))
 	minus tag mm
 	tagsmatch todomatch tagsmatcher todomatcher kwd matcher
 	orterms term orlist re-p level-p prop-p pn pv cat-p gv)
@@ -15377,7 +15377,7 @@ also TODO lines."
 		       (setq gv `(org-cached-entry-get nil ,pn)))
 		     (if re-p
 			 `(string-match ,pv (or ,gv ""))
-		       `(equal ,pv ,gv)))
+		       `(equal ,pv (or ,gv ""))))
 		    (t `(member ,(downcase tag) tags-list)))
 		mm (if minus (list 'not mm) mm)
 		term (substring term (match-end 0)))