From: Ihor Radchenko <yantar92@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Ignacio Casso <ignaciocasso@hotmail.com>,
emacs-orgmode@gnu.org, tom@tomdavey.com
Subject: Re: Timestamp parsing inside node properties and other contexts out of org-element-object-restrictions
Date: Wed, 23 Mar 2022 21:06:54 +0800 [thread overview]
Message-ID: <871qysu8b5.fsf@localhost> (raw)
In-Reply-To: <877d8llha9.fsf@nicolasgoaziou.fr>
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> So, depending on the current command, Org may on may not treat objects
>> matching org-ts-regexp-both as timestamps.
>>
>> This situation complicates syntax and makes org-element unreliable when
>> dealing with Org buffers.
>
> This is orthogonal to syntax. I think the docstring of that predicate is
> clear: `org-at-timestamp-p' is a convenience function for broader uses
> of timestamps, which existed before Element.
Let me clarify. What I have in mind is my proposal about using
org-element for fontification:
https://orgmode.org/list/87ee7c9quk.fsf@localhost
The usage org `org-at-timestamp-p' in multiple places in org.el implies
that Org treats timestamp-like strings as actual timestamps even when
org-element does not recognise them. Then, if, say, I implement a new
fontification system purely relying on org-element, some timestamp-like
strings will remain interactive (for example, using mouse context menu)
but will not be fontified.
Any other idea relying on org-element might also suffer from such
issues.
>> Should we just simply allow timestamps to be a part of node property
>> values? Should we _not_ treat timestamp-looking text outside their
>> allowed contexts (like quotes, source blocks, etc) as timestamps?
>
> Allowing Org syntax in property values is creating another set of
> problems: often the value is really a string that Org shouldn't try to
> interpret.
Is there an easy example demonstrating the potential problem?
For reference, I did try to implement parsing node-property values and
even did not fail any tests, except the one directly checking the
current timestamp-in-property-drawer parsing.
Best,
Ihor
prev parent reply other threads:[~2022-03-23 13:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-12 10:06 [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/)] Ignacio Casso
2022-03-12 12:28 ` Ihor Radchenko
2022-03-21 15:58 ` Tom Davey
2022-03-21 23:21 ` Ignacio Casso
2022-03-22 0:50 ` Samuel Wales
2022-03-22 10:02 ` Ihor Radchenko
2022-03-22 10:17 ` Ihor Radchenko
2022-03-22 21:02 ` Tim Cross
2022-03-23 12:07 ` Ihor Radchenko
2022-03-23 0:10 ` Samuel Wales
2022-03-23 12:21 ` Ihor Radchenko
2022-03-24 3:38 ` Samuel Wales
2022-03-22 3:43 ` Tom Davey
2022-03-22 9:47 ` Ihor Radchenko
2022-03-22 10:00 ` Timestamp parsing inside node properties and other contexts out of org-element-object-restrictions (was: [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/)]) Ihor Radchenko
2022-03-22 21:10 ` Tim Cross
2022-03-22 23:16 ` Tom Davey
2022-03-23 0:25 ` Tim Cross
2022-03-23 13:13 ` Ihor Radchenko
2022-03-22 23:05 ` Timestamp parsing inside node properties and other contexts out of org-element-object-restrictions Nicolas Goaziou
2022-03-23 13:06 ` Ihor Radchenko [this message]
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=871qysu8b5.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=ignaciocasso@hotmail.com \
--cc=mail@nicolasgoaziou.fr \
--cc=tom@tomdavey.com \
/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).