emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx


From: Ihor Radchenko
Subject: Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx
Date: Wed, 19 Jun 2024 15:46:52 +0000

Morgan Smith <morgan.j.smith@outlook.com> writes:

> So I gave up on this specific patch because I wrote a patch to just
> rewrite the entire `org-clock-sum' function using org-element API.
> Attached is the `org-clock-sum' rewrite patch which I've been using for
> a while with no issues.  I have half finished patches locally to add
> more clocktable tests and to add clocktable benchmarks which is why I
> hadn't submitted this yet.
>
> This probably belongs in this email thread instead:
> https://list.orgmode.org/87y18vxgjs.fsf@localhost/

Yup. But my "to-followup" reminder came up earlier for this thread ;)
I do not remember every single thread, unfortunately.

> Ideally the fix in that commit should be ported to the org-element API.
> Notably, the malformed clock from the email thread from that commit is
> parsed a little strangely by org-element.  I'm not sure what effect this
> has on my rewrite patch but regardless, we should probably fix this.
> Notice how ":day-end" and ":minute-end" are set but not ":hour-start" or
> ":minute-start".

That's expected.
We have the following _syntax_ description for clock lines:

https://orgmode.org/worg/org-syntax.html#Clocks
...
clock: INACTIVE-TIMESTAMP-RANGE DURATION

And [2012-01-01 sun. 00rr:01] is a perfectly valid timestamp without
time part. Org does allow arbitrary additional text in the timestamps.
(it is by design, to allow future extensions of the syntax, like the
planned timezone support)

-- 
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 via email to

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