emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anders Johansson <mejlaandersj@gmail.com>
To: org-mode-email <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix bug assuming canonical duration units in org-agenda-format-items
Date: Mon, 9 Aug 2021 16:41:37 +0200	[thread overview]
Message-ID: <CAKJdtO880iVy_4M0==jqfSd-n3XsKXRSSBjxjmDqXJbz6qqeWw@mail.gmail.com> (raw)

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-to-minutes s1 t)
-           nil t)))
+           '(("d" (special . h:mm))) t)))
       ;; Compute the duration
       (when s2
         (setq duration (- (org-duration-to-minutes s2)

             reply	other threads:[~2021-08-09 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 14:41 Anders Johansson [this message]
2021-08-11  9:39 ` [PATCH] Fix bug assuming canonical duration units in org-agenda-format-items 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKJdtO880iVy_4M0==jqfSd-n3XsKXRSSBjxjmDqXJbz6qqeWw@mail.gmail.com' \
    --to=mejlaandersj@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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