emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-agenda queries for absent properties


From: Jens Schmidt
Subject: Re: org-agenda queries for absent properties
Date: Sun, 6 Aug 2023 16:42:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1

On 2023-08-06  11:19, Jens Schmidt wrote:

I
will also add tests for matching property names having minuses and then
we can see how it goes.

Went well.  With a property name regexp

  "\\(?5:[[:alnum:]_-]+\\)"

and the following Org file

--------------------------------------------------
* H1 :BAR:
:PROPERTIES:
:TEST-FOO: 1
:END:
* H2 :FOO:
:PROPERTIES:
:TEST-FOO: 2
:END:
* H3 :BAR:
:PROPERTIES:
:-FOO: 1
:END:
* H4 :FOO:
:PROPERTIES:
:-FOO: 2
:END:
* H5
--------------------------------------------------

the search expressions "TEST-FOO!=*0-FOO" and "-FOO+TEST-FOO!=*0" work
as expected, finding only the first heading.

The expression "-FOO!=*0-FOO" does *not* work, though, since the leading
minus in the property name is gobbled by the greedy inclusion/exclusion
subexp "\\(?1:[-+:]\\)?".  However, the remedy is simple: Add an
explicit plus sign: "+-FOO!=*0-FOO".

Documented that in the Org manual, added tests, looks good.  Please
check.

Attachment: 0001-org-make-tags-matcher-Add-starred-property-operators.patch
Description: Text Data


reply via email to

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