emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Johnson <j3soon@gapp.nthu.edu.tw>
To: Johnson <j3soon@gapp.nthu.edu.tw>, emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <921641e1-bd1a-d98c-e793-d5a21762eb3b@gapp.nthu.edu.tw> (raw)
In-Reply-To: <87eef59ina.fsf@nicolasgoaziou.fr>

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	other threads:[~2021-04-24  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 10:31 Bug: Incorrect duration format example in comments in 'org-duration.el' [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Johnson
2021-04-20 13:42 ` Nicolas Goaziou
2021-04-24  8:49   ` Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=921641e1-bd1a-d98c-e793-d5a21762eb3b@gapp.nthu.edu.tw \
    --to=j3soon@gapp.nthu.edu.tw \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).