From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CGW4B4J2LmH7GwAAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 20:35:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4PRKA4J2LmHxYwAA1q6Kng (envelope-from ) for ; Tue, 31 Aug 2021 18:35:46 +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 4AFE52FCE8 for ; Tue, 31 Aug 2021 20:35:45 +0200 (CEST) Received: from localhost ([::1]:42772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL8bn-00086U-Bb for larch@yhetil.org; Tue, 31 Aug 2021 14:35:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL8as-00085b-KN for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 14:34:46 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:43313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL8aq-0006ap-Mx for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 14:34:46 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id A06EC1C0006; Tue, 31 Aug 2021 18:34:38 +0000 (UTC) From: Nicolas Goaziou To: Anders Johansson Subject: Re: [PATCH] Fix bug assuming canonical duration units in org-agenda-format-items References: <87wnosb9rc.fsf@nicolasgoaziou.fr> <87k0k1oh05.fsf@gmail.com> Date: Tue, 31 Aug 2021 20:34:37 +0200 In-Reply-To: (Anders Johansson's message of "Tue, 31 Aug 2021 17:46:02 +0200") Message-ID: <87zgsx5upu.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.197; envelope-from=mail@nicolasgoaziou.fr; helo=relay5-d.mail.gandi.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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 , Timothy 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=1630434945; 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; bh=qvWIhWcO7RGWZzppRX5qPtsQEyqxTZJQ74C55JA6XzM=; b=dCkCLT5ncTcibHa1dxEyYZBp9vgLK54ZU3JqXJs2ZfIYTx0AY7S59Hgy4wBmUK4FErckK1 mQACu5j/B3dA4HYCEm2sKChg3XaAho0koGrjn5bx89wQWe7jbFUrE0L42eV7ydPzlUPBIl f2bAH0ggiQfUkTw+VObpe0JOoFJW9WJFNbuEe4zYHOPnIrKfySgF0mzUFvolJ47nj7pi5S /z3AtNHEz/PRefNcVRSIYNLOUtlGHg6kXsju6KmGi/bhcW7oyq3DZaffhLw+Iv7yOhv82x /T0h9035apIkt0UYjfy6bdHh9URUpKFJ+q8O/OwoDwjaiAJ06/MRvGV8oafPqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630434945; a=rsa-sha256; cv=none; b=eBgXNPA02LXNbB/OPM/XozlBc40OeXmJBXQaTj2g7w4Ppw6jFt14ZP2Scv6Nr/t2p6OT7P tm+CnaSSXuGx2i4/pCOhKvKfNkd64+q6RZSZKO1cQZczWQJ3qOpeNIHpdndW1ardXBSjxH ccdcRtvx1ROJ6sXCQByFaa+eMDGBajsMInpbsCNuO4Gan0W5Wb1tDZSRCLwbx7wT88uIPJ 7dXMbWcyy+7irEsPJOXLD4V2APBDqhQWRp6WpBnHczPaJCUjL8Mhpb8w8KZdtw7fjpXBpt eL36GURVwZYgV1815hKd5gSqOHBcX8N8/yiZKH7aRnE9IlJUG+efX7aFa4gttg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 4AFE52FCE8 X-Spam-Score: -0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: aIkJ60mJibSU Hello, Anders Johansson writes: >> 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. You don't really need to understand it. I suggest using a filter as the very first step of the function. > 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. Exactly. Regards, -- Nicolas Goaziou