From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WEfHKrTN72Z9egEA62LTzQ:P1 (envelope-from ) for ; Sun, 22 Sep 2024 07:56:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WEfHKrTN72Z9egEA62LTzQ (envelope-from ) for ; Sun, 22 Sep 2024 09:56:36 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=l3PxWMKT; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726991796; 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=8UgVeCdP5Rqoymv8yESDc+CpaW8d+LLrVUOLNpiBDgU=; b=QLbnx0BY1ZzR2b3OUhfVtQTwmFP+7RD7L0qnIqM1tOA5KZZ17diIpuqU+7nk2WPojwMUmT QktKynaiPavQXEC9GJ/yc1+20Vo3H2CKoJmiGKx3VTTrg+ODiWJuGZ34C27ME2vJP0iEXK zRh/Tf1ZcNoL6W7zh1IT9IM6T3bMlE7m+lqR4XqY0jxMGX+ibAcOg+712fKBXnwmLlGzT7 WGtBgtIuWvgZxL2W/6LrKinFekrgzdR8zXO4dO8QvHEtSAQNOrw61gWvrihI3QicZ9h/7o gWx+rwO5Tj3p1Ul+iYU0pvF7QQwZcO+rwfTox/KjkcPen5cWdUs6VnBzmmTjgw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=l3PxWMKT; 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=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726991796; a=rsa-sha256; cv=none; b=cYfGwGgRxmBKO32j39D6biecxAkswmtsqwhS+OLxgHu7ke6e3ExRymNT9Q0BH+U3lQa7xe R0PCQ8rp+BO94sgt3KfjlSnIXEyTk+rUV1J1UOrND71cORxs7jhmFko8KZTLWpCwVH03nI EfVppvaselU/lGieqbANc+/uCi1DeXD8p7cQRJBNvJpFAROWuZp7KA20AyRT7Viixfn0bo 3KAe+FiUjxx7b9AUW0bmPnN+Vr7wD/3kLg9a4Q9K30A0U+axHzJa1gRMmSlhJl9k4lyk/e 656sVmNG5KwiqeL9aea6gXKK1PX70Szt+WmvlSNuhF7IaNcFREJdt6+JMd3zmg== 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 2B7494E70 for ; Sun, 22 Sep 2024 09:56:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssHRO-0002Dm-Ji; Sun, 22 Sep 2024 03:55:34 -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 1ssHRH-0002CR-Jq for emacs-orgmode@gnu.org; Sun, 22 Sep 2024 03:55:28 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssHR1-0001kr-9I for emacs-orgmode@gnu.org; Sun, 22 Sep 2024 03:55:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6297D240101 for ; Sun, 22 Sep 2024 09:55:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726991708; bh=thkp+LaOb1b2//zlB6g4Q1R6GuZMyUnqwnnH60R6bUM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=l3PxWMKTl20kK6RYrQNBnuh1TvFtBWRcmgIFZMrQsohwXdlodCRGOazqpV7i56CMK B+QPYKSrniXz/3ZoE3CvdoFEGljW0U0oOtS9Xr+vtsTnIx8tucbvbo2qKd/z90F2Fn qBrZJ8sCBTnJRedqWWW6g1bxmqfHwDgZN+Bw3Y1zZ1vJrdNprukbfjkrRBaPolPFoz gtRbrMN6RYnHQoH5xaGmUMLnd4VC1DGPFgOeFVCi+2J+AUeH0ceenZgwugMYLNcbL5 Bf5AbhFlvAG5Q609pY4PRpdBAp3QTXPkhaHUvrcpd8cQ05wrgGlVXusOhLqA8nIWVm 89zLCpjrooO3Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XBJLz28B0z9rxB; Sun, 22 Sep 2024 09:55:07 +0200 (CEST) From: Ihor Radchenko To: Guido Stevens Cc: emacs-orgmode@gnu.org Subject: [BUG] Regression: org-duration fails to support duration ranges since Org 9.0.6 (was: support range durations) In-Reply-To: <4b0d8deb-585e-4dd5-a332-72de057a3247@cosent.net> References: <8734m1ktv9.fsf@localhost> <4b0d8deb-585e-4dd5-a332-72de057a3247@cosent.net> Date: Sun, 22 Sep 2024 07:56:43 +0000 Message-ID: <87ed5cruis.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, 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.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-Queue-Id: 2B7494E70 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.75 X-Migadu-Spam-Score: -9.75 X-TUID: YnyiCKun3ZH3 Guido Stevens writes: >> 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) At this point, using emacs -Q, I am getting Debugger entered--Lisp error: (error "Invalid duration format: \"1d-2d\"") error("Invalid duration format: %S" "1d-2d") In other words, such ranges are not supported in Effort property. I am not sure what Doom does so that you are not getting that error. > 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 I bisected the problem back to the initial introduction of org-duration library. It simply does not support duration ranges. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7e8cf5f4c202f51231d444f41735a4db06cb7052 The right thing appears to be implementing such support in org-duration. However, it is not at all trivial, as the duration API in org-duration.el is designed without ranges in mind. > 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-duration-to-minutes is called and throws an error. Why is it even > called? Agenda converts and stores duration in minutes as a part of calculating metadata for agenda items. Your duration format cannot be converted to minutes, leading to the error you are seeing. My current conclusion is that we unfortunately got a regression since Org 9.0.6. And it is not very easy to fix it without implementing range durations across the whole codebase. One possible "fix" could be making org-duration ignore ending estimate in the duration ranges, but that's not ideal. This is a difficult bug to address. As a workaround, I suggest using some other property for your effort estimates. Then, est+ summary in column view will work without errors. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at