[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++ |
Date: |
Sun, 13 Aug 2023 14:17:18 +0000 |
"Valentin G. J. Herrmann" via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:
> In the attachments is a better version with tests that also addresses
> your latest critique.
Thanks!
> + (setq time
> + (save-match-data
> + (org-time-string-to-time ts)))
> + (unless (equal what "h")
> + (setq time
> + (time-add time
> + (seconds-to-time (* 3600
> org-extend-today-until)))))))
Another corner case:
(setq org-extend-today-until 4)
* TODO Heading
<2023-08-12 Sat 17:00 ++1d> Timestamp a bit (< 4 hours) earlier than current
wall time
C-c C-t d
* TODO Heading
<2023-08-13 Sun 17:00 ++1d>
Expected:
* TODO Heading
<2023-08-14 Mon 17:00 ++1d>
I generally feel that the approach with `time-add' will have a number of
weird corner cases.
--
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>
- [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Valentin Herrmann, 2023/08/13
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Ihor Radchenko, 2023/08/13
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Ihor Radchenko, 2023/08/13
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Valentin G. J. Herrmann, 2023/08/13
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++,
Ihor Radchenko <=
- Message not available
- Message not available
- Message not available
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Ihor Radchenko, 2023/08/14
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Bastien Guerry, 2023/08/14
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Valentin G. J. Herrmann, 2023/08/16
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Ihor Radchenko, 2023/08/14
- Re: [PATCH] org.el: Respect org-extend-today-until in timestamps with ++, Valentin G. J. Herrmann, 2023/08/16