emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] Agenda no longer works for timestamps inside properties drawer


From: Ihor Radchenko
Subject: Re: [BUG] Agenda no longer works for timestamps inside properties drawer [9.5.2 (release_9.5.2-24-g668205 @ /home/ignacio/repos/emacs/lisp/org/)]
Date: Tue, 22 Mar 2022 17:47:03 +0800

Ignacio Casso <ignaciocasso@hotmail.com> writes:

>>> What you see in the new Org version is not a bug. Property values are
>>> treated as plain text by Org.
>
> I think that even if timestamps were never intended to be used inside
> property drawers before, the fact that it worked for a long time and
> nothing in the documentation suggested otherwise makes it a de facto
> feature, even if unintended, and should be preserved.

After further reading the source code, I figured that agenda is, in
fact, supposed to handle timestamps inside property drawers. Optional
arguments for org-at-timestamp-p imply that, in agenda specifically,
timestamps inside node properties are considered timestamps despite they
are not being parsed as timestamps by org-element.

> I've located the line in org-agenda.el responsible of the new behavior,
> and the following patch seems to fix it. I suggest it is incorporated
> into the repository, maybe with a variable
> org-agenda-skip-timestamps-in-properties-drawer defaulting to t if not
> everyone agrees.
> -                    (not (eq 'timestamp (org-element-type 
> (org-element-context)))))
> +                    (not (memq (org-element-type (org-element-context)) 
> '(timestamp node-property))))

I pushed a different version of the patch using org-at-timestamp-p to
bugfix as d9bf64f06.

Best,
Ihor



reply via email to

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