[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[DRAFT][PATCH] org-encode-time compatibility and convenience helper
From: |
Max Nikulin |
Subject: |
[DRAFT][PATCH] org-encode-time compatibility and convenience helper |
Date: |
Mon, 11 Apr 2022 22:22:48 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
Hi,
After a recent report of incorrect daylight saving time handling in agenda:
Ignacio Casso [BUG] org-agenda thinks timestamps after 23:00 correspond
to the next day Tue, 29 Mar 2022 15:09:10 +0200
https://list.orgmode.org/PAXPR06MB7760238F410CBE3203F78EE0C61E9@PAXPR06MB7760.eurprd06.prod.outlook.com
I tried to create a compatibility helper that will use currently
recommended way to call `encode-time' with single list argument for
Emacs-27 and newer, but use the only available call style as separated
arguments for older Emacs versions.
From my point of view
- it should work at the compile or load time to minimize runtime
performance impact,
- since both ways to call `encode-time' are necessary (in a half of
cases a list returned by `decode-time' is available, in other cases
timestamps are assembled from scratch, none is preferred), it should be
convenient in both cases,
- it should allow Org to work even if support of multiple `encode-time'
arguments will be removed from Emacs.
Paul Eggert proposed org-encode-time-1 defsubst/defun
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54764#10
My patch requires more changes since the macro is just defined but not
actually used. It does not fix the problem with "no DST" flag returned
by some function in Org. I can prepare next patches, but I think it
should be decided at first which approach should be accepted by Org Mode:
- org-encode-time accepting both list or separate arguments
- mix of `encode-time' with multiple arguments and org-encode-time-1 for
lists.
0001-org-macs.el-Introduce-a-helper-for-encode-time.patch
Description: Text Data
- [DRAFT][PATCH] org-encode-time compatibility and convenience helper,
Max Nikulin <=