emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: Incorrect duration format example in comments in 'org-duration.


From: 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/)]
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

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 <j3soon@gapp.nthu.edu.tw> 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
<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 <RET>
(org-duration-string-to-minutes "1d3h5min") <RET>
I cannot reproduce it. I get 1625.0.

Maybe your Org is too old. So-called "compact" form was introduced after the 
others.

Regards,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]