From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kPWwMtvbg2B3LQAAgWs5BA (envelope-from ) for ; Sat, 24 Apr 2021 10:50:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SH5MLtvbg2AgVwAAbx9fmQ (envelope-from ) for ; Sat, 24 Apr 2021 08:50:35 +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 3985A27187 for ; Sat, 24 Apr 2021 10:50:34 +0200 (CEST) Received: from localhost ([::1]:42280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laDzl-0002Wp-CR for larch@yhetil.org; Sat, 24 Apr 2021 04:50:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laDzF-0002WV-3W for emacs-orgmode@gnu.org; Sat, 24 Apr 2021 04:50:01 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:38674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laDzC-0004MG-FA for emacs-orgmode@gnu.org; Sat, 24 Apr 2021 04:50:00 -0400 Received: by mail-pg1-x533.google.com with SMTP id w10so393580pgh.5 for ; Sat, 24 Apr 2021 01:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gapp-nthu-edu-tw.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=DodjtEcezMb020Uikq2GeRj7uQJLQzqpXd7NFFm/GQU=; b=iCaihdxk9JgMT6lt4eylZ3OaX0yqII+WGY+jQVk3g5mSpw9hbYGldM1+gpU2mX28h8 6DcTYlZxRuZqRhDV3Itrfp3T8cU1uOf7pWV2+lc7/aKWK5tZ/uWhPVaPJdVCqZDiFaXf wrwSXY3yC+45EAHzO1fuqf9M6ig5FAaOO9FO6z5SipIFOTcMNn/z1gTyakeEDjdxGhaF 1wayJVoZ/CtREzsvUBSC/D0Pw1mKdnv6S0ll2vQENJLqv7B3Af5l7LAq1MWn9yJHz6BD qIC6LzPO/zmkCP8Fg7Ftk19DfssQiQiU2/+89Q6494Bt+4VMIq1Xb8RUdy6MSqYUyvId hM8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=DodjtEcezMb020Uikq2GeRj7uQJLQzqpXd7NFFm/GQU=; b=GgLnZPN6tFSue4L890B+OB13ZuFo6RJkhHk8j0cOL1+w2M/fcO+aZuzG67H1aHZFnX 9QCaIXO/lpCqE29cvtosBARAucb0aLXQaiBpV7P0uSsyDkOI7EwGvtbiQqpcIwajo4Qq 74PVSANGwwBcMdUrW+LpuTsNbtQ6e3GuRxujEPFMz6qVLx2qR44l9muOeTA72waX8GIT 6Yq49WkO8D9z2hkdwl4YG0j2PMLHVyig/CBV2T+M7Ga4H9SCCyDA49PwAh4KwnOFI79d dmVda6uUz+HeqrdUfZosvwPPyXN79PbwOBLoUFuMArHlr3GAmEt5OPCx4U/Dp0TZiFDg gFwQ== X-Gm-Message-State: AOAM5324p//lgdG4pAK5kjZ6+GpCVoCMzTMtGH90QoBfxbfyt+2RFK6P X4K60mJIhdsNvcsiI4jtwQ+Ueg== X-Google-Smtp-Source: ABdhPJwtMxXVXOpV1ejlqftTkH7Cpx5ki1QkthMCfQOjB07JkAGnJhAKcFEsQnJaQNbv+OjbD7aDbQ== X-Received: by 2002:a62:8817:0:b029:272:3729:e109 with SMTP id l23-20020a6288170000b02902723729e109mr1085025pfd.50.1619254193918; Sat, 24 Apr 2021 01:49:53 -0700 (PDT) Received: from [192.168.2.107] (61-220-36-70.HINET-IP.hinet.net. [61.220.36.70]) by smtp.gmail.com with ESMTPSA id a1sm6563074pfi.161.2021.04.24.01.49.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Apr 2021 01:49:53 -0700 (PDT) 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/)] To: Johnson , emacs-orgmode@gnu.org References: <6b6f566d-eb3d-2430-02e3-ee1eda56d7d1@gapp.nthu.edu.tw> <87eef59ina.fsf@nicolasgoaziou.fr> From: Johnson Message-ID: <921641e1-bd1a-d98c-e793-d5a21762eb3b@gapp.nthu.edu.tw> Date: Sat, 24 Apr 2021 16:49:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <87eef59ina.fsf@nicolasgoaziou.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=j3soon@gapp.nthu.edu.tw; helo=mail-pg1-x533.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-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: , 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=1619254234; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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:dkim-signature; bh=DodjtEcezMb020Uikq2GeRj7uQJLQzqpXd7NFFm/GQU=; b=ASrky/Be3aIlb3LbPweaIoUQsKi89NnzY9EPJ7BZtcu95dFMpPs070EHlDHm/euT14e5iQ 3sSWTMPikCgxIBcRW5x3spWp3F7TvGB6+c9naCa7S6MVkqtuNllwKSj4BzK1dQT2My3koh i3PPMLWrUvpXX/72dj5QwUIvvHisYxw5l+7Nb1jRn+FQLnJNz/twESCx2iUZRbuq2Pf22N jUHxnIvaJPwrcmKaG87LhqAkDhEykA2tmgpgAFYwFCLA1MD52XeqRYrHy60DTkCJLY0F/y FuvhCuC9RqYybZgjp8HRRsXiBDmHxuLf5CNoNobHue2GKUEE02QeLFnehSPj8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619254234; a=rsa-sha256; cv=none; b=b/qvtDRLbdbzZ2d438jqEpxXeQJLPFRN2Mjv5kgENmTNKarcsvDUDbtZp6dbNOYFSCBZEY OO/nrSOFqSEMhf7JVmIKDILBRZOFAYIykkf/NdMR3OCsqd2OaAqW/Hm1xWvKrl9KNB8Gxp 5004uHPFOCNZfteMS7CyfeXlh0PhVbmVYwYoy3BZmNuKiNwcKiZstT+5o+R30eol0Loi0m MjZzb2U/NbF5waOCaUFxDguS6VaHAtM+qdgnildXY4FNNAkbea4dX9670P8zuVen9X6GSj GNzWi5aabb3ZFOXdsRGzI1b3cCDzWnDDXc/S17ttbSkisYG+KGfnEdfS4otEfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gapp-nthu-edu-tw.20150623.gappssmtp.com header.s=20150623 header.b=iCaihdxk; 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.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gapp-nthu-edu-tw.20150623.gappssmtp.com header.s=20150623 header.b=iCaihdxk; 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: 3985A27187 X-Spam-Score: -2.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: BXYFKWqZiqEf Yes, the issue is due to using an older version of Org. I searched the change log and saw that the compact form is introduced in Org 9.4, while mine is 9.3. Thanks for your help! Sincerely, Johnson On 4/20/2021 9:42 PM, NicolasGoaziou wrote: > 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,