emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Johnson <j3soon@gapp.nthu.edu.tw>
To: emacs-orgmode@gnu.org
Subject: 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 18:31:19 +0800	[thread overview]
Message-ID: <6b6f566d-eb3d-2430-02e3-ee1eda56d7d1@gapp.nthu.edu.tw> (raw)

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>

However, the following error occurred:

(error "Invalid duration format: \"1d3h5min\"")

I also tried adding "1d3h5min" as an EFFORT property, however, resulting 
in the same error. I assume that the comment should be fixed by removing 
this particular example? (Other examples work fine)

-- 
Sincerely,
Johnson



             reply	other threads:[~2021-04-20 11:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 10:31 Johnson [this message]
2021-04-20 13:42 ` Bug: Incorrect duration format example in comments in 'org-duration.el' [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Nicolas Goaziou
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=6b6f566d-eb3d-2430-02e3-ee1eda56d7d1@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).