emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Problem with property matching


From: Nicolas Goaziou
Subject: Re: [O] Problem with property matching
Date: Tue, 26 Nov 2013 18:00:03 +0100

Hello,

Carsten Dominik <address@hidden> writes:

> 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]*\\)$"))

Why \\(?3:[^ \t\r\n].*?\\) instead of \\(?3:.*?\\) ?

>  (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?

Not really. It just means that we cannot have a property named "END".


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]