emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mamoru Miura <mamo3gr@gmail.com>
To: Ihor Radchenko <yantar92@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: Wed, 27 Jul 2022 09:49:06 +0900	[thread overview]
Message-ID: <CADX2rP9Y8CnHmcx9uMb1YUy6A8UHn4xrxFvm_Z6rFSziKUDYMA@mail.gmail.com> (raw)
In-Reply-To: <877d463cuz.fsf@localhost>

Thank you for reviewing my patch.

>Ideally, we should factor out the duration calculation from the depths of the agenda code into a separate function and then use it.

I agree with it.

>But I am not even sure if this calculation is always same in different agenda types...

Where can I get the specification of agenda types? I'm interested in
the refactoring (but cannot work on it immediately...)

Kind regards,
Mamoru

2022年7月21日(木) 20:47 Ihor Radchenko <yantar92@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
> types...
>
> 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)
>
> Best,
> Ihor


  reply	other threads:[~2022-07-27  0:51 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
2022-07-27  0:49       ` Mamoru Miura [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=CADX2rP9Y8CnHmcx9uMb1YUy6A8UHn4xrxFvm_Z6rFSziKUDYMA@mail.gmail.com \
    --to=mamo3gr@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=s.vlasov@uvt.nl \
    --cc=yantar92@gmail.com \
    /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
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

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