From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wL0GJv2L4GLjrAAAbAwnHQ (envelope-from ) for ; Wed, 27 Jul 2022 02:51:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iNP2Jf2L4GK2cwEA9RJhRA (envelope-from ) for ; Wed, 27 Jul 2022 02:51:09 +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 500F3C2A9 for ; Wed, 27 Jul 2022 02:51:09 +0200 (CEST) Received: from localhost ([::1]:45868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGVGW-0002CW-2a for larch@yhetil.org; Tue, 26 Jul 2022 20:51:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGVEo-0002B4-6D for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 20:49:22 -0400 Received: from mail-yb1-xb29.google.com ([2607:f8b0:4864:20::b29]:36359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGVEm-00038x-JS; Tue, 26 Jul 2022 20:49:21 -0400 Received: by mail-yb1-xb29.google.com with SMTP id z132so9065383yba.3; Tue, 26 Jul 2022 17:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=6PLrDa8Rs8IJ1Wa4osEnTP+i2x33Rwe321mSwBS6yWA=; b=MZGLMHtCKH2EJuGP57ACq3DkQLscIEtzwbLi5Ms/jH2mcJQT1W37YJmGYktlpKw1qs IP24xE6l48E+rStwg+jK1ga2TXaajWQfEYT4iMapHenL7sUxcYt1FFGBBzwb664/D5LI 3qq0Uq/g1Ku82bd91yK2/93mGpxfJad/7yPyHPmnSF20d27sR9pqyQ598kBixSqcSjBN zx262yccrt9N+4YLS94aNpxSMQkZogUxd+tW8nl3Esa3HdWo0QSy5AmkCvVqVa9z1HDi UCFiYg1NxFjhk54LFVQleO7KjSYJ4Xxv/pXIGGzoZ7BLUFKEIuMnshH8Terb9YC7Tyde 7N0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=6PLrDa8Rs8IJ1Wa4osEnTP+i2x33Rwe321mSwBS6yWA=; b=uMwuEQJbK/uqkRrcmjfg+ybBIUGkSQW1ydj7Xl/e15UDyNOn4Y87+fkIqndHHu+t3H 2dBRYDNMNyahjt92iG1towY24dvawFY4sO+H6keDmNc90LZE9yz6DiJk/3BGzoWhNsne yhu+MDhQeg5XYaspYirHeH6V2b7BS7APG7g8ayv9OqcG5nbAAumXEHD5zzqMt/j7HSB9 cf1G4dcpe2DGm86vbxQ80k0TZmkDPw/wed5kKMLSC1+EAbgxF4zpVZapPMGa0CoUjRuu n5xS3u+yK8TLWDBe7dys+dAKnF2dPE8fEYg39RARchdxFTSeawbPgSZB1TCExNqGHG1B sh4w== X-Gm-Message-State: AJIora+1J1LaYNjZAeeAaD+B7eslSG96FjtVSBeo9a9DbTwnJpAYaU9y 2k6pcAU8m9Z6kjEBNUNtkhMxev+zffrPZQMqP/4= X-Google-Smtp-Source: AGRyM1tSM/pPkeDp+7aY27yrX4cyIEVjokhY9kEZ159LvsorOSCfsy4ZqZOX8DvM235iB7xx9ruvCEjTpjwanNO3hEE= X-Received: by 2002:a05:6902:4aa:b0:671:83dc:62f7 with SMTP id r10-20020a05690204aa00b0067183dc62f7mr207830ybs.212.1658882957203; Tue, 26 Jul 2022 17:49:17 -0700 (PDT) MIME-Version: 1.0 References: <9F4AA657-D34B-4B85-A80D-1DD4B3017DB2@gmail.com> <87mtd542uv.fsf@localhost> <877d463cuz.fsf@localhost> In-Reply-To: <877d463cuz.fsf@localhost> From: Mamoru Miura Date: Wed, 27 Jul 2022 09:49:06 +0900 Message-ID: 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/)] To: Ihor Radchenko Cc: bzg@gnu.org, emacs-orgmode@gnu.org, s.vlasov@uvt.nl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::b29; envelope-from=mamo3gr@gmail.com; helo=mail-yb1-xb29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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=1658883069; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6PLrDa8Rs8IJ1Wa4osEnTP+i2x33Rwe321mSwBS6yWA=; b=QPzYFipTKzffTi89GlCU0VmGB56VTOr9kFV9+P3BNuuK4tATFDGsHGSGg9K+3yPOV5Bxev NMk/U3W0teH9TJpRsv4puTlTF1jSu3lpIzbzCAE6x20jM04fCrmSxoBW1/FuAaalnImUyE R6eiaPKWUeucLyj7/filgcQQQuz9MiU37b9/1gHS8bUdpXo7QETHtoDMwyu6QW1SSgyezB 3w0+SttOYFx/3N1hIKBInxfV2q6rFDbWOIOV7/rqvBo242j6eBmnTYTVo5PyAXU5eDEzam dNgdtid8PPRAtLwMLBdU+rPKr6DFP5KZ5gfMfYs05ja+cG9esarEaYqkJMHl+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658883069; a=rsa-sha256; cv=none; b=EIMfdN15tMB/F7UzO4ojV7Zd5Z8RwGm3sx5nQqPddRWQIDeNbKfZ83yKjcvE/IBe6y/31r 86/7akQ/lhlrRaL/S/vIa6EiGiXm1afpKrG/qrxTpkbNvnQyIVK8w6UCrU+rDWCDJOlqnK m9+ys37xF6MnC8t4+LFxs/9qeeIGBgk+Cmvls4myiC6FJxGRAurEXv3VyVzAcOnE/iN7e/ M0vhijgvKJMdwdC2bfoHPM2JSp1cC8fTdF8t0vxyvgm+5eem5GJ86GCqwlABPAhL0LjhM4 YZWn1BOu5yornD/GRwtuR7foS2LBTXz4/nNxoVTCgmHq2a9AR2BBB1aIjrRpbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MZGLMHtC; 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.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MZGLMHtC; 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: 500F3C2A9 X-Spam-Score: -5.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: majEFAYZh3Qv 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 age= nda 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=E5=B9=B47=E6=9C=8821=E6=97=A5(=E6=9C=A8) 20:47 Ihor Radchenko : > > 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) 'dur= ation)) > > - 'face 'org-warning)) > > + (when-let* ((formatted-item (org-agenda-form= at-item nil (org-get-entry) nil nil nil t)) > > + (duration-string (get-text-prope= rty 0 'duration formatted-item))) > > + (propertize (org-duration-from-minutes dur= ation-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