emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mamoru Miura <mamo0110@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: Mon, 18 Jul 2022 23:41:50 +0900	[thread overview]
Message-ID: <9F4AA657-D34B-4B85-A80D-1DD4B3017DB2@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

Dear 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,

[-- Attachment #2: 0001-lisp-org-colview.el-Fix-missing-addition-of-appointm.patch --]
[-- Type: application/octet-stream, Size: 1477 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

* lisp/org-colview.el (org-columns--collect-values): re-compute
appointments' duration because this funtion can not get text property

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

             reply	other threads:[~2022-07-18 17:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 14:41 Mamoru Miura [this message]
2022-07-19 14:02 ` Bug: Appointments duration and effort sums in agenda column view [9.3.7 (release_9.3.7-700-ga1e5be @ ~/.emacs.d/straight/build/org/)] 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
  -- 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=9F4AA657-D34B-4B85-A80D-1DD4B3017DB2@gmail.com \
    --to=mamo0110@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --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).