On 2023-08-23  16:00, Jens Schmidt wrote:

> Given the property name syntax in
> 
>   https://orgmode.org/worg/org-syntax.html#Node_Properties
> 
> the subre in `org-make-tags-matcher' to match property names
> should then look similar to
> 
>   "\\(?5:[[:alnum:]_]+\\|:[^[:space:]]+?:\\)"
> 
> , right (colons being stripped off later)?  I'm really asking
> about the trailing plus signs here, but these do not seem to
> make sense in property queries.

Yet another edge-case: In the Org syntax definition a property
name is really delimited by a "colon-whitespace" sequence.  This
takes out the ambiguity whether a property name is defined
non-greedily

  :[^[:space:]]+?:

or greedily

  :[^[:space:]]+:

I'm too lazy right now to think about the consequences, but I
hope this makes a difference only for really weird property
matches, like this:

  :foo:=1+:bar:=2

This would be parsed non-greedily as

  FOO == 1 && BAR == 2

or greedily as

  FOO:=1+:BAR == 2

I'd go for non-greedily defined property names.

Reply via email to