From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: 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: Thu, 23 Feb 2017 12:54:51 +0100 Message-ID: <8737f5f7g4.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgs9e-0007kt-Bt for emacs-orgmode@gnu.org; Thu, 23 Feb 2017 07:05:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgrz4-000565-LP for emacs-orgmode@gnu.org; Thu, 23 Feb 2017 06:54:56 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:37465) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgrz4-000561-FV for emacs-orgmode@gnu.org; Thu, 23 Feb 2017 06:54:54 -0500 In-Reply-To: (dale@codefu.org's message of "Wed, 22 Feb 2017 21:05:24 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Dale Cc: emacs-orgmode@gnu.org Hello, Dale writes: > 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. I did the former. This is now fixed. Thank you. Regards, -- Nicolas Goaziou