From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oPTtIm7v52aQXwEA62LTzQ:P1 (envelope-from ) for ; Mon, 16 Sep 2024 08:42:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oPTtIm7v52aQXwEA62LTzQ (envelope-from ) for ; Mon, 16 Sep 2024 10:42:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726476142; 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; bh=zCuewMoqhqzRZKNBebdPo3v4UFfsba4IlyaxgmRi/zY=; b=sRFhnD3halsGiKaMJQjzOgQgmX9EJi2apRGEKUIoYgVryYfnchS7XKLsq+Du7++SAaV3u0 +HmHAVhJCq7pKeu71/uFn7bQhq25SzjuzkDKCtoGLFOi5hRg2h02POd+AK8OBvMerf/EJV 0ti2uvH6ITaDTe6J7RZGmGYRn+cSp90ZPW89RkgDG+dirp1BZWocHzpCIlhis/og7uul3D kZ0Csd8vjBEOLkZOg36ZXQ+r1s8q8jAGHaiA5fQ1SMsTi2MVnASKfhREmZdMGlhlZ7b7z3 p7H0HkobQjW0phRGQjB3dULa7tEgbflRRdmqLuVkxyuSBl9rDkaeS+VPKNKR/A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726476142; a=rsa-sha256; cv=none; b=YYY6WZMgNXGhhF2gZEVUbBolnW+KXPNYNm3fzvGIeVa7sZpmt9VEm5WlGDjV+MZfn8PwqS 5PyvpLqC/iKdWqa4nR1PVuFaxVl8rG/ZUdpE16hdohVjDlYNlfd9SypGODanyAmt8G9sJv 1IF/15QyQ4KE60nsHLgsENeVh4KXIh6b0JaB4pkBMzF94aoyRz3KAIJXkiwdEe8rT2Purv W/xEqU2tIebAx1VEAqn3Wf4MZjq2r06ZgjjDe83oqbRboYuOWKQSblA/TOtn8hD2JgvM64 AxOI0cF/oBGLbfufL1SfgW0RloZ69Q755tj57lNWFvTzJJKAXCiBPv68bCQXWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none 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 4EAC187717 for ; Mon, 16 Sep 2024 10:42:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sq7IW-0001k6-3K; Mon, 16 Sep 2024 04:41:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sq7IE-0001i0-2a for emacs-orgmode@gnu.org; Mon, 16 Sep 2024 04:41:14 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sq7IA-0003Wq-Ie for emacs-orgmode@gnu.org; Mon, 16 Sep 2024 04:41:09 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2C0911C000B; Mon, 16 Sep 2024 08:41:01 +0000 (UTC) Message-ID: <4b0d8deb-585e-4dd5-a332-72de057a3247@cosent.net> Date: Mon, 16 Sep 2024 10:41:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: support range durations To: Ihor Radchenko Cc: emacs-orgmode@gnu.org References: <8734m1ktv9.fsf@localhost> Content-Language: en-US From: Guido Stevens Organization: Cosent -:- social knowledge technology In-Reply-To: <8734m1ktv9.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: guido.stevens@cosent.net Received-SPF: pass client-ip=2001:4b98:dc4:8::225; envelope-from=guido.stevens@cosent.net; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.59 X-Migadu-Queue-Id: 4EAC187717 X-Spam-Score: -6.59 X-TUID: uSrF/pqMqupZ On 9/15/24 14:02, Ihor Radchenko wrote: > Guido Stevens writes: > >> As per https://orgmode.org/manual/Column-attributes.html I'm using range >> durations to express effort estimations. Those get summarized nicely in >> column views, using the {est+} summarizer. But when I access an agenda >> view that encounters a task that has such a range duration directly set, >> the agenda chokes with an error message: >> >> org-duration-to-minutes: Invalid duration format: "1d-2d" > > May you please provide more details on how to trigger the error? Sure. I'm providing the Doom keybindings for the actions I'm taking. 1. Abbreviated snippet from my Doom config: (use-package! org :defer t (setq! org-global-properties `(("Effort_ALL" . "0 0.5d 0.5d-1d 1d 1d-2d")))) 2. Set estimate "1d-2d" on a task (C-c C-x e) 3. Open an agenda view that contains that task (C-c n a t) org-duration-to-minutes: Invalid duration format: "1d-2d" > >> ... >> * lisp/org-duration.el (org-duration-to-minutes): Do not choke on >> low-high range durations (e.g. "2d-5d") when rendering an agenda. Calculate the average >> of the range instead. >> >> Range durations are valid when estimating effort, and supported >> elsewhere via the {est+} summarizer. > > Org mode durations have no notion of ranges. It is completely > org-colview thing. So, modifying `org-duration-to-minutes' is not > appropriate. We need to fix org-colview, not org-duration. > The reproduction above does not involve org-colview. The disagreement apparently is, that org-colview says range durations are supported for effort estimates, and even has code handling them via the {est+} summarizer, when they are not supported in org-duration. https://github.com/emacs-mirror/emacs/blob/f27553c30a772a0103d2e6762e4d7f588f302e4b/lisp/org/org-colview.el#L1419 I get your point about not accepting this patch. None of the other functions or docstrings in org-duration mentions or handles ranges, fair enough. I'm puzzled though, because I did not come up with this feature. It's genuinely useful and it appears to have worked in the past. https://lists.gnu.org/archive/html/emacs-orgmode/2014-12/msg00435.html Maybe sorting agenda views by effort was not active at that stage: I suspect that is what is triggering the error. Which points to a potential solution (and also to a potential speed optimization): even when I am not sorting on effort at all, this error is thrown, so why is org-duration-to-minutes even called at all in the agenda view? Is there a way to disable that? I.e. even when I simplify my sorting strategy to: org-agenda-sorting-strategy '((agenda priority-down) (todo priority-down) (tags priority down) (search priority-down)) ) org-duration-to-minutes is called and throws an error. Why is it even called? I'm out of my depth in Lisp and don't know how to properly step that call flow. -- Guido Stevens | Cosent | https://cosent.nl s o c i a l k n o w l e d g e t e c h n o l o g y