From: Mamoru Miura <mamo3gr@gmail.com>
To: bzg@gnu.org
Cc: 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: Tue, 19 Jul 2022 00:27:22 +0900 [thread overview]
Message-ID: <b836cf23-4cfb-7ff8-ffc7-ba141581f1be@gmail.com> (raw)
In-Reply-To: <87eee69sv5.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
Dear Bastien and org community,
I have also faced the problem and have made a patch to fix it. This
patch would not be the best solution since I'm unfamiliar with Emacs
Lisp and the detailed implementation of org-mode. I'd appreciate that if
you would review and merge the patch attached to this mail.
Kind regards,
Mamoru
[-- Attachment #2: 0001-lisp-org-colview.el-Fix-missing-addition-of-appointm.patch --]
[-- Type: text/plain, Size: 1441 bytes --]
From 314877d3e4ec994a025f267a12ebc4d16b5a2aa5 Mon Sep 17 00:00:00 2001
From: Mamoru Miura <mamo3gr@gmail.com>
Date: Mon, 18 Jul 2022 18:52:40 +0900
Subject: [PATCH] lisp/org-colview.el: Fix missing addition of appointments to
effort
* lisp/org-colview.el (org-columns--collect-values): re-compute
appointments' duration because this funtion can not get text property
`'duration'.
TINYCHANGE
---
lisp/org-colview.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 13643101b..35acc9deb 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -288,10 +288,9 @@ possible to override it with optional argument COMPILED-FMT."
;; to use appointment duration.
org-agenda-columns-add-appointments-to-effort-sum
(string= p (upcase org-effort-property))
- (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)))
"")))
;; A non-nil COMPILED-FMT means we're calling from Org
;; Agenda mode, where we do not want leading stars for
--
2.37.0
next prev parent reply other threads:[~2022-07-18 15:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 19:25 Bug: Appointments duration and effort sums in agenda column view [9.3.7 (release_9.3.7-700-ga1e5be @ ~/.emacs.d/straight/build/org/)] Stanislav Vlasov
2020-09-07 5:12 ` Bastien
2021-05-16 23:11 ` Bastien
2022-07-18 15:27 ` Mamoru Miura [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-18 14:41 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
2022-07-27 4:06 ` Ihor Radchenko
2022-07-27 8:12 ` 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=b836cf23-4cfb-7ff8-ffc7-ba141581f1be@gmail.com \
--to=mamo3gr@gmail.com \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=s.vlasov@uvt.nl \
/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).