From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qGkCN03bfmB2XwEAgWs5BA (envelope-from ) for ; Tue, 20 Apr 2021 15:46:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wI6rMk3bfmCmGgAAB5/wlQ (envelope-from ) for ; Tue, 20 Apr 2021 13:46:53 +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 5217822702 for ; Tue, 20 Apr 2021 15:46:53 +0200 (CEST) Received: from localhost ([::1]:49206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYqiK-0001Vm-2T for larch@yhetil.org; Tue, 20 Apr 2021 09:46:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYqeV-0007kQ-Tk for emacs-orgmode@gnu.org; Tue, 20 Apr 2021 09:42:55 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:43983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYqeU-0002VY-2V for emacs-orgmode@gnu.org; Tue, 20 Apr 2021 09:42:55 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 1D44A2000D; Tue, 20 Apr 2021 13:42:49 +0000 (UTC) From: Nicolas Goaziou To: Johnson Subject: Re: Bug: Incorrect duration format example in comments in 'org-duration.el' [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] References: <6b6f566d-eb3d-2430-02e3-ee1eda56d7d1@gapp.nthu.edu.tw> Mail-Followup-To: Johnson , emacs-orgmode@gnu.org Date: Tue, 20 Apr 2021 15:42:49 +0200 In-Reply-To: <6b6f566d-eb3d-2430-02e3-ee1eda56d7d1@gapp.nthu.edu.tw> (Johnson's message of "Tue, 20 Apr 2021 18:31:19 +0800") Message-ID: <87eef59ina.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.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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: emacs-orgmode@gnu.org 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=1618926413; 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=LtMpB/HMaMUe6QLsyVUaGZlLqyzbvmCkJcJ2eQ12FWU=; b=GQ1kt1wy0CGqnKwrGqRKllYxexdDFFsKL71fi9rSB+9Rm5Kt/dfq11lWbbxSswR2RMJfuC 2fPaJ+K+4JDkWgAhRHDPwMImPDqApHlGhIxB9+2eW/emCgxy1z+a4DkPxSOkBmLv8IB7sH laat52bOeUvnOYNnwPvZ8suCfQZa4ul6Mq+g/1jjJeNg5FASyDTMs6wGHUKt0lzNxFl+5D +mBLY/iAw4rWnt/qQIgBpmCx8mv6zFb/iEyUuYstlBs4gQaqs2nm01v7NC7oMgRzrdhxPl eZhBF4mXtuq5iHj5U4g4PUZBQoSyp51MV1aOkJw0hiSqJjM4JiZWJWhj/8UpSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618926413; a=rsa-sha256; cv=none; b=CJtmvzs3xGIy+cANZFUxKRBpKi9aT9q53ximWxiBIKV88T1uhlNYrRpkG8P90Gwan1KSdf ZKM+zzvBuVDEGVsJ+Rtz1QmMZj14x6ubCl2ZiHNcKy+QEPaXb/C8s6gUcpqXi0scDUTRsT eemhCQvucjClm6EU+sVpV7nzQupent5HDgSWX2mEx/9YB/6qzUDKDZADbrqWkf9xVs/PYD 3hVtp4r3A3//PnF2glhe5unNyS6Tg3e0gvKkgp1Kjm0WgnkPuC9tKOADqCMzHdfrZwqOqR 3o/a+/gwbVidsvIL1MXmR7UKQGvlNrmJnJvbUIYAqOa1JJYr4V4Lfasnq/JESA== 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: -2.44 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: 5217822702 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: ud0mKNg+K2IX Hello, Johnson writes: > I'm contributing to an org file python parser to correctly parse durations. > > I found the comments in org-duration.el > (https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-duration.el#L31 > ), > mentioning that `1d3h5min` is a valid duration format. > > So, I expect the following should work: > > M-x eval-expression > (org-duration-string-to-minutes "1d3h5min") I cannot reproduce it. I get 1625.0. Maybe your Org is too old. So-called "compact" form was introduced after the others. Regards, -- Nicolas Goaziou