[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 11:19:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 |
On 2023-08-06 09:55, Ihor Radchenko wrote:
But from here it gets more intersting:
- The code uses subre "\\\\-" in property names to (supposedly) allow
for inclusion of minus characters in property names, which (probably)
could be confused with term negation.
Not probably. It is known to be confused.
https://orgmode.org/list/87jzv67k3p.fsf@localhost
Right. But the issue back then appeared because the subre for property
names does not match minus characters, just alnums and underscores:
\\([[:alnum:]_]+\\)
What I'm trying to convey is: If we match plain minus characters in
above subre, these will be greedily goobled up including any following
operator, which makes the whole thing uniquely an operator term. If
there is no following operator, but something else, the whole regexp
backtracks and (hopefully) matches a following negative term.
- Even more, IMO one could do away completely with the minus-quoting and
unquoting, since the overall regexp should allow for unambiguously
matching minus characters both
+ in {tag regexps} (because of "{[^}]+}" gobbling them) and
+ in property names (because a property name must always be followed
by some operator)
*without* them getting confused with term negation.
Or do I miss something here? A cursory test with sth like
+foo-bar="xxx"-patchday=202302
seems to work fine.
Agree.
Ah, OK. I thought you wouldn't. Let me redo this thing as I think it
is correct (including let-binding common subres as you suggested). I
will also add tests for matching property names having minuses and then
we can see how it goes.
- Re: org-agenda queries for absent properties, Jens Schmidt, 2023/08/01
- Re: org-agenda queries for absent properties, Ihor Radchenko, 2023/08/02
- Re: org-agenda queries for absent properties, Jens Schmidt, 2023/08/05
- Re: org-agenda queries for absent properties, Ihor Radchenko, 2023/08/06
- Re: org-agenda queries for absent properties,
Jens Schmidt <=
- Re: org-agenda queries for absent properties, Jens Schmidt, 2023/08/06
- Re: org-agenda queries for absent properties, Ihor Radchenko, 2023/08/07
- Re: org-agenda queries for absent properties, Jens Schmidt, 2023/08/07
- Re: org-agenda queries for absent properties, Ihor Radchenko, 2023/08/08