emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix bug assuming canonical duration units in org-agenda-format-items
@ 2021-08-09 14:41 Anders Johansson
  2021-08-11  9:39 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Anders Johansson @ 2021-08-09 14:41 UTC (permalink / raw)
  To: org-mode-email

org-duration-from-minutes was called with canonical = t, but without
providing a corresponding format only using the canonical units. This
broke if the user’s org-duration-format used other than the canonical units.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b4e5547d7..e78ab6b72 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6749,7 +6749,7 @@ (defun org-agenda-format-item (extra txt
&optional with-level with-category tags
           (org-duration-from-minutes
            (+ (org-duration-to-minutes s1 t)
               org-agenda-default-appointment-duration)
-           nil t)))
+           '(("d" (special . h:mm))) t)))
       ;; Compute the duration
       (when s2
         (setq duration (- (org-duration-to-minutes s2)
--
2.32.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-14 12:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 14:41 [PATCH] Fix bug assuming canonical duration units in org-agenda-format-items Anders Johansson
2021-08-11  9:39 ` Nicolas Goaziou
2021-08-31 13:55   ` Timothy
2021-08-31 15:46     ` Anders Johansson
2021-08-31 18:34       ` Nicolas Goaziou
2021-09-02  7:47         ` Anders Johansson
2024-02-14 12:37           ` Ihor Radchenko

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).