From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Johnson <j3soon@gapp.nthu.edu.tw>
Cc: 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: Tue, 20 Apr 2021 15:42:49 +0200 [thread overview]
Message-ID: <87eef59ina.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <6b6f566d-eb3d-2430-02e3-ee1eda56d7d1@gapp.nthu.edu.tw> (Johnson's message of "Tue, 20 Apr 2021 18:31:19 +0800")
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,
--
Nicolas Goaziou
next prev parent reply other threads:[~2021-04-20 13:46 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 [this message]
2021-04-24 8:49 ` Johnson
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=87eef59ina.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=j3soon@gapp.nthu.edu.tw \
/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).