[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Problem with property matching
From: |
Carsten Dominik |
Subject: |
[O] Problem with property matching |
Date: |
Tue, 26 Nov 2013 13:27:48 +0100 |
Hi,
I think there is an error in the property matching regexp. It will not match a
line where the property value is empty. I propose the following change, which
makes the value part optional:
--------------------------------------------------------------------------------
diff --git a/lisp/org.el b/lisp/org.el
index 7a4d244..4641ce5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6205,7 +6205,7 @@ Use `org-reduced-level' to remove the effect of
`org-odd-levels'."
Match group 3 will be set to the value if it exists."
(concat "^\\(?4:[ \t]*\\)\\(?1::\\(?2:"
(if literal property (regexp-quote property))
- "\\):\\)[ \t]+\\(?3:[^ \t\r\n].*?\\)\\(?5:[ \t]*\\)$"))
+ "\\):\\)\\([ \t]+\\(?3:[^ \t\r\n].*?\\)\\)?\\(?5:[ \t]*\\)$"))
(defconst org-property-re
(org-re-property ".*?" 'literal)
--------------------------------------------------------------------------------
Can anyone think of problems this would cause? Nicolas, does the syntax
definition require a non-empty value?
- Carsten
- [O] Problem with property matching,
Carsten Dominik <=