Org-mode mailing list
 help / color / mirror / 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
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-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


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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 14:41 Anders Johansson [this message]
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

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://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 \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git