Morgan Smith <[email protected]> writes:

> I was trying to increase test-coverage of org-clock.el but immediately bumped
> into a couple of bugs so I didn't get very far.
>
> Do note there is a FIXME in the final patch.
>
> bug #1: month addition in org-timestamp-change.
>
> In an org-mode buffer try to run `org-timestamp-up'
> (S-<up>) on the month of the timestamp "<2026-01-31 Sat>".  It becomes
> "<2026-03-03 Tue>"!  That's not right.

> We are not doing the month roll over calculations correctly.  I'd rather not 
> do
> these calculations by hand and would rather use the shiny function
> `decoded-time-add'.  This is a wonderful function that I'd like to use more
> throughout the org-mode code base.  Only problem is that until quite recently,
> it bugged out on negative month values so I'm forced to add a compatibility
> shim around it.

Ok, but then we need to make sure that we are actually using the time in
the expected format. Your patch org-timestamp-change: Use proper time
structure accessor functions uses decoded-time-minute on time0, which is
from org-parse-time-string. And org-parse-time-string just returns a
list. Note that decoded-time-minute is a struct method. That struct
might change in subtle ways, so we should not rely on the list and
struct being equivalent.

Otherwise, LGTM.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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