From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CG0QBxNPLmHdTQEAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 17:47:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gEKaAhNPLmFpVwAAbx9fmQ (envelope-from ) for ; Tue, 31 Aug 2021 15:47:31 +0000 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 594CC1808A for ; Tue, 31 Aug 2021 17:47:30 +0200 (CEST) Received: from localhost ([::1]:42202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL5yy-0000UT-Gw for larch@yhetil.org; Tue, 31 Aug 2021 11:47:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL5xp-0007wK-SF for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 11:46:17 -0400 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:40501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mL5xo-0000fF-6y for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 11:46:17 -0400 Received: by mail-lj1-x22f.google.com with SMTP id i28so32670939ljm.7 for ; Tue, 31 Aug 2021 08:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HxAZv3cpsWnSFS7vMjEcTf2tD44/zlAgvobY5hVpWJw=; b=Ekc/Zh5gh4OczBickkMhJaHCKjqJ0LES1LL7BITnQqPOGdtoUiLdR0gkKRONzkEnQZ 4h8fn4DVIA5dN3KncF/dEt1aBWbxyfAXklfZ+e8jtqRHlN7ukBbetih8ZCQei9m2wJSv +OW2ThUVWaLDZ85CQHPU+ERY1li1YZB77rQgMtPpaTYzLEPC4y87xvuCH1SgEouqTX4b 3pDb7Tk18bO/aYreEt6sqqeyaDRTh9O14Yuk/MvsN3CgkkQUdcZ22LTReAFeoJZHVqP0 ZBuKtY1hobjWtjDukTiqn0MynoCaf5Twri9XDA1DsrglUvuaYHf/39+IDImj/JeWyzqB aoiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HxAZv3cpsWnSFS7vMjEcTf2tD44/zlAgvobY5hVpWJw=; b=QmNxGQsT5RiQYMXI5bgCNGhpsLBu3TFf/NJbwCDKQ1u3iWlpgAfGNyrwiBKJt04Hhh lcp5rMAUAz0UEpBwlpiziE792E/snxQx/ZQMAhmHlBi04/9N56usKA7cXxAOVMICzGpd +BKf0zVtRwKNL+VWwMj8MsFuMc1vwSnv/bbVyP5LVXmu4qbM0a3gca9nXrEZl5MNqJI9 xO8RXO0C0TKhtN/52gZAdkMlC7gJi8KzG72AtS0n4lDZp3yTSYtHlnNquQ4+CNMjlSNa jyklgY//cWXceotqtHjzU7YVMtgvi+U33k+sXtL103g8gBE7J1i7Z2IBweNiycWFCRrE G+zA== X-Gm-Message-State: AOAM533JTBJPlktkgQyPtlEfTsRXMLxpLU6TUITu5dBa3aI7j6qE7Ufl eQhVydSRVXvTkfmew0yQxn5dtYqkAwkQYl+5oAo= X-Google-Smtp-Source: ABdhPJzMOoRYA3GovFOjscIBQXIOEPiiH6vAMjmqNo898m9KjzuMUxOJ8EZJ+s3222fcDI5/h7z4YuuiNAEJeSOlc8U= X-Received: by 2002:a2e:814f:: with SMTP id t15mr25749511ljg.363.1630424773644; Tue, 31 Aug 2021 08:46:13 -0700 (PDT) MIME-Version: 1.0 References: <87wnosb9rc.fsf@nicolasgoaziou.fr> <87k0k1oh05.fsf@gmail.com> In-Reply-To: <87k0k1oh05.fsf@gmail.com> From: Anders Johansson Date: Tue, 31 Aug 2021 17:46:02 +0200 Message-ID: Subject: Re: [PATCH] Fix bug assuming canonical duration units in org-agenda-format-items To: Timothy Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=mejlaandersj@gmail.com; helo=mail-lj1-x22f.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: org-mode-email , Nicolas Goaziou Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630424850; 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=HxAZv3cpsWnSFS7vMjEcTf2tD44/zlAgvobY5hVpWJw=; b=RRMZhCVTyFFoez0DUWKlDtS3uKX0uBNnFZzeEEoPh1ugb4O6VXsSv3bnWJcKg2+TmF9B2t /5U7kq7h9I19cWn8Y3S+k1q8nL3u10RgC57TH4vb/xKP4gjuDkEwZzcy0MkvcwpsXG+6ie FKt6CFZfZk7HHvn8JPRxISz4WoIIqy96r1Aqv696o1D+7gjZxp/WPRzvgnHPpcFbhOLvGI 5vWxn7CMpeytFADYmLUlESxNer0k7KT9nKOgWQ/1AMhVw0Mdks3anlqdkjrZC9L11CbkbR n536CEaYmzFBt65oPUdFGvE1vvdRdUS8s71BO+xPmlw8YTvqb+Q/Rrw1F/Vgpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630424850; a=rsa-sha256; cv=none; b=sYT5BqNcIlXwaM1D6GwDtrrF6pgsXyPGsRbTyTAY091x1WWPeS0Xu5b8Je7QWiPsHqCW/m jdu83+MrM+eu17Sv+Dc5oa5n9Xd64I8J6MKvyQH6Kr5eR1lJh8pbcFksXh/o51Gr8/gfQ7 Dwr7eD8ndwJ/DremRvzhLusFRGJhl9b8o9vnLEllDfh0n8JmDOV9DP5nvDUk7oHP/L+rH6 nh95RCaVfDefMxCqFJcgSCsBKdHU/LSSZDSfs2b2tKom56Z04R0Devmyf6DwiAoTHvYQSS exWEuo5ZMW6G6nlyN2dhS5vOyvMo7fTXoqa7MzqVOe79pU7DFL4GWB9HcO9TTQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="Ekc/Zh5g"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: 0.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="Ekc/Zh5g"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 594CC1808A X-Spam-Score: 0.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: EunO0btEWzUm Hi, Oh, I sent a response but failed to send it to the list and only to Nicolas (hard to do things right using the gmail web interface) I include it below: > I think a proper fix would be to change `org-duration-from-minutes' so > it removes any unknown unit from what is provided from fmt or > `org-duration-format', and defaults to (special . h:mm) if nothing is > left. > > WDYT? > Perhaps. I don't understand `org-duration-from-minutes` well enough to change it. I guess the stripping of unknown units from fmt or `org-duration-format` would then have to compare either against `org-duration-units` or `org-duration-canonical-units` depending on the canonical argument. But the full logic of org-duration-from-minutes escapes me. I also noted that the only other invocations of `org-duration-from-minutes` with the canonical argument is in `org-columns--format-age` (where a format is provided). Overall the interaction of these functions across the codebase seems quite complex now.