emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Mamoru Miura <mamo3gr@gmail.com>
Cc: bzg@gnu.org,  emacs-orgmode@gnu.org,  s.vlasov@uvt.nl
Subject: Re: Bug: Appointments duration and effort sums in agenda column view [9.3.7 (release_9.3.7-700-ga1e5be @ ~/.emacs.d/straight/build/org/)]
Date: Thu, 21 Jul 2022 19:48:52 +0800	[thread overview]
Message-ID: <877d463cuz.fsf@localhost> (raw)
In-Reply-To: <CADX2rP_NnULRKXMK4KnHWtEJSVSQkp_m-qSMu2oje3MAOvtRSQ@mail.gmail.com>

Mamoru Miura <mamo3gr@gmail.com> writes:

> ...
> Steps to see this issue:
> 1. run M-x org-agenda
> 2. type "a" to show "agenda for current week or day"
> 3. run M-x org-agenda-columns (C-c C-x C-c)

Thanks for providing the details! I have also found the relevant thread.
It was not immediately visible because of my MUA settings.

> -			     (get-text-property (point) 'duration)
> -			     (propertize (org-duration-from-minutes
> -					  (get-text-property (point) 'duration))
> -					 'face 'org-warning))
> +			     (when-let* ((formatted-item (org-agenda-format-item nil (org-get-entry) nil nil nil t))
> +			                 (duration-string (get-text-property 0 'duration formatted-item)))
> +			       (propertize (org-duration-from-minutes duration-string) 'face 'org-warning)))

I cannot say that I like calling org-agenda functions, but I cannot
propose anything better either (agenda code sucks...).

Ideally, we should factor out the duration calculation from the depths
of the agenda code into a separate function and then use it. But I am
not even sure if this calculation is always same in different agenda

For the code, it will err when the time range is located inside the
headline and org-agenda-search-headline-for-time is set to non-nil
(which it is, by default)


  reply	other threads:[~2022-07-21 11:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 14:41 Bug: Appointments duration and effort sums in agenda column view [9.3.7 (release_9.3.7-700-ga1e5be @ ~/.emacs.d/straight/build/org/)] Mamoru Miura
2022-07-19 14:02 ` Ihor Radchenko
2022-07-19 23:17   ` Mamoru Miura
2022-07-21 11:48     ` Ihor Radchenko [this message]
2022-07-27  0:49       ` Mamoru Miura
2022-07-27  4:06         ` Ihor Radchenko
2022-07-27  8:12           ` Mamoru Miura
  -- strict thread matches above, loose matches on Subject: below --
2020-08-03 19:25 Stanislav Vlasov
2020-09-07  5:12 ` Bastien
2021-05-16 23:11   ` Bastien
2022-07-18 15:27     ` Mamoru Miura

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=877d463cuz.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mamo3gr@gmail.com \
    --cc=s.vlasov@uvt.nl \


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