From: Dale <dale@codefu.org>
To: emacs-orgmode@gnu.org
Subject: Bug: Agenda clockcheck: org-duration-to-minutes: Wrong type argument: stringp [9.0.5 (release_9.0.5-318-gb1353c @ /tmp/emacs/org-mode/lisp\ /)]
Date: Wed, 22 Feb 2017 21:05:24 -0600 [thread overview]
Message-ID: <CAEj9N4LvZrOrWRjiJn4h=ka79B35BBhvXZtJVN_E0UG1HiJPqQ@mail.gmail.com> (raw)
Hi! I think org-mode from master currently has a bug in agenda's
clockcheck mode. Steps to reproduce:
1. Start emacs -Q and load org-mode master (b1353cb6f83)
2. Open a empty org-mode buffer, e.g.: C-x C-f test.org RET
3. M-x org-agenda RET
4. Hit "a" for "Agenda for current day or week"
5. Hit "v" then "c" to switch to clockcheck view
Expected results: clockcheck view is engaged (albeit empty given the
empty org-mode file)
Observed results: I receive the following error:
org-duration-to-minutes: Wrong type argument: stringp, 0
Due to this error, clockcheck mode does not seem to activate.
Emacs : GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0)
of 2017-01-30
Package: Org mode version 9.0.5 (release_9.0.5-318-gb1353c @
/tmp/emacs/org-mode/lisp/)
Other information:
I suspect this is happening as of the recent switch to using the
org-duration library (7e8cf5f4c20), which replaced some/all uses of
org-hh:mm-string-to-minutes with org-duration-to-minutes.
org-hh:mm-string-to-minutes accepted an integer as its argument
(despite its name):
(cond
((integerp s) s)
...
In contrast, org-duration-to-minutes only expects a string as its
argument. The "Wrong type argument" seems to be coming from its first
string-match-p call.
org-agenda-show-clocking-issues will potentially call
org-duration-to-minutes with the integer 0 as its argument:
(mintime (org-duration-to-minutes
(or (plist-get pl :min-duration) 0)))
The default value for org-agenda-clock-consistency-checks also
specifies :min-duration 0; that is, an integer rather than a string.
I cannot say whether org-duration-string should accept a number, as
org-hh:mm-string-to-minutes did, or instead whether org-agenda.el
should be changed to always pass it a string.
Kind regards,
Dale
next reply other threads:[~2017-02-23 3:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 3:05 Dale [this message]
2017-02-23 11:54 ` Bug: Agenda clockcheck: org-duration-to-minutes: Wrong type argument: stringp [9.0.5 (release_9.0.5-318-gb1353c @ /tmp/emacs/org-mode/lisp\ /)] Nicolas Goaziou
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='CAEj9N4LvZrOrWRjiJn4h=ka79B35BBhvXZtJVN_E0UG1HiJPqQ@mail.gmail.com' \
--to=dale@codefu.org \
--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).