From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ePYsFDE92WLTIwAAbAwnHQ (envelope-from ) for ; Thu, 21 Jul 2022 13:49:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YL1REzE92WKHLgAAG6o9tA (envelope-from ) for ; Thu, 21 Jul 2022 13:49:05 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 03E302D7D9 for ; Thu, 21 Jul 2022 13:49:05 +0200 (CEST) Received: from localhost ([::1]:59368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEUfv-0001yN-Q3 for larch@yhetil.org; Thu, 21 Jul 2022 07:49:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEUeu-0001xE-1I for emacs-orgmode@gnu.org; Thu, 21 Jul 2022 07:48:00 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:55919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEUeo-0005Zi-8n; Thu, 21 Jul 2022 07:47:58 -0400 Received: by mail-pj1-x1032.google.com with SMTP id b10so1362049pjq.5; Thu, 21 Jul 2022 04:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=hNcLUArTXFKUFm8aSO4NgVat4Df33LPWAEijdJ95SIc=; b=NcjD2S7VgqGtLbOGkbVb7RVsJ6bMOKELOb7fjG9WUcCURgTKDGLO+2FueGHWNjb2y6 V90VHAxvS+t8kU+/738fqqObjAuLf+HqUJ0XVw6P5m0DihVVsL4xCTucnqZHv3zwvoQR 9QL1esl5nFicOlHO+XED10ZuuccCXnQicbL2g7lD0gvNM836nT77ZrqTTOjzThOvmu77 bfRDhuk+m+YbUPkroso2NQYN3KBORPCLERimr8TqAr3khZktult/S6v3VLJOzvtIAqis 0uOSp9qfq6lye36u0iXIyFZrenv+8cAXOs3+kPNvxh/gv06wEqA1uorpgtBoQ3RB6hwg QxkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=hNcLUArTXFKUFm8aSO4NgVat4Df33LPWAEijdJ95SIc=; b=WRzG0XGBNOaw19OrcjUJWhInUpg785pcx8VqX/LguioC170mdL9v/QwPS9f9OYAdZ5 DpLDNd54WeLo+ceS5jKtHalmICCmujCFL1FMRaHVZnGn9oOarBpTt+tKm5GH1fBRoPqP 2bdR5kY1vRjhiJkldYGsMINKpaQS+byMzdmx6+Y08GhwXal0dt/zAqpqIietf0RAS9xm /uW+0ZGNY2bK/1EtX/0t8crlx+5LTRL2C/OoF0zkoRpVo5+6j59w8QG+1OWSwD4XaAGU R6E0Jmpd3c2MTFoCt9EIxqbu9yMPh81n5aqs8X7h1r5z0kqy8txeVJY0BEZ0TGDRYUgP DTdA== X-Gm-Message-State: AJIora8Yka2zLjddYIYpiWnvkCI9qxbrEmcZLGpqZJkMMio1/qu3iBVG bYVMWlNsbmH1eYl1oN94t6E= X-Google-Smtp-Source: AGRyM1sjdurvUztRqSaWt8r6BB2NFV3jzk0tOiTMGbmnDQTqWE5XreSWMyezN4rs3HKz+F5xJq0iMQ== X-Received: by 2002:a17:902:ec91:b0:16c:29d7:5e90 with SMTP id x17-20020a170902ec9100b0016c29d75e90mr45130020plg.114.1658404072286; Thu, 21 Jul 2022 04:47:52 -0700 (PDT) Received: from localhost ([2409:8a70:2b7:3fb0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id p1-20020a654bc1000000b004148cbdd4e5sm1316598pgr.57.2022.07.21.04.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 04:47:51 -0700 (PDT) From: Ihor Radchenko To: Mamoru Miura 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/)] In-Reply-To: References: <9F4AA657-D34B-4B85-A80D-1DD4B3017DB2@gmail.com> <87mtd542uv.fsf@localhost> Date: Thu, 21 Jul 2022 19:48:52 +0800 Message-ID: <877d463cuz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658404145; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hNcLUArTXFKUFm8aSO4NgVat4Df33LPWAEijdJ95SIc=; b=nTVJId60OP0IQCa9zMxuTA1xIDfPUfqL9lvWxQn5Cw3RuWz0KXNKs+PA8RIpxri4XNlwSQ D0EYcWc/w9Md7f+g2FzaIUNV5VmZ0Bn5VhXu6jKcOhlQ7LEIiAsACn5ejx+S7CgnApTJWV r5bHJv98prnM/vxBN1VMC2G31se+TWG+J+wmgoi87aDTbPsczklj20lbMBUjQrnAXSQr4k ckwjvOLGZXspdqqxxWsQaLu2BlxFxhbNcT15i/Xt4Ng7pxOwH3NGfTaD20qIMQR0sS+dYH 7nyoIsarpwzo9zqUcvk6hJaOLFblnv9X25B+VHd8xYnZHHFrtr2cXVzpSWVHoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658404145; a=rsa-sha256; cv=none; b=NOFJn4B3J8+fcAebKsyi+jinfKaGWD4ejJ+vs8ft0wXxS4xReQlkxsWFVZarTqoMJ3enYJ T7t5K/NViP8IeJGHDF+zzPXAsGH69desBiCJj45pqfnXZAmh3KzQts4qIas7yoF2WSpYdm 64ltcxkgFL+i5o24cZh6VBHRbqdzt895HW33/IdsvQOFOSf0LC4/EkWjlQ1sTGlB6xiw0j uHNCrI6M+EfNniGClbDaO03OoXiXMpDQR6cVL9wuWTQ3V7XR/3T+1fHwgpgXQlhiw5j56G 2KDC3zgwP4wybfEss1NDsjcvhH/7VNK/7dwJKZqLhZSTTJZ7fAMGW0Jglz1Cjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NcjD2S7V; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NcjD2S7V; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 03E302D7D9 X-Spam-Score: -5.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: b6BhH9Flk4Hv Mamoru Miura 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