emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: org-agenda queries for absent properties
Date: Mon, 31 Jul 2023 06:45:43 +0000	[thread overview]
Message-ID: <87o7jsinoo.fsf@localhost> (raw)
In-Reply-To: <9132e58f-d89e-f7df-bbe4-43d53a2367d2@vodafonemail.de>

Jens Schmidt <jschmidt4gnu@vodafonemail.de> writes:

> The following was initially meant as bug report until I understood that
> it's actually some sort of feature ...
>
> since the absent property "patchday" on the "relax" todo entry is
> defaulted to value zero, obviously.

This is a side effect of handling comparison operators in tag matcher.
The property value is processed as (string-to-number (or value "")). And
since (string-to-number "") => 0, you get what you get.

This code is out there since the beginning of git history.

> So I would like to have something easier to type (and remember! why not
> "!=" or "/="?) then

Not "!=" and "/=" is because parsing of match string is too dumb. See
`org-make-tags-matcher'.

>    patchday<>0&patchday<=202305
>
> How about starred agenda property operators that match only if the
> operand property is actually present, which would result in this query:
>
>    patchday<=*202305
>
> Section <info:org#Matching tags and properties> does not seem to provide
> any information on "definedness" expressions for properties.

If you are up to a job of adding this to `org-make-tags-matcher' and not
breaking things, you can try. But we should really provide more readable
match syntax, similar to org-ql; sooner or later.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2023-07-31  6:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-30 17:13 org-agenda queries for absent properties Jens Schmidt
2023-07-31  6:45 ` Ihor Radchenko [this message]
2023-08-01 18:50   ` Jens Schmidt
2023-08-02  6:45     ` Ihor Radchenko
2023-08-05 10:56       ` Jens Schmidt
2023-08-06  7:55         ` Ihor Radchenko
2023-08-06  9:19           ` Jens Schmidt
2023-08-06 14:42             ` Jens Schmidt
2023-08-07 11:53               ` Ihor Radchenko
2023-08-07 20:20                 ` Jens Schmidt
2023-08-08  7:04                   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7jsinoo.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=jschmidt4gnu@vodafonemail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).