From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dale 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 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgjjM-0002JR-UL for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 22:06:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgjjL-00059c-V8 for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 22:06:08 -0500 Received: from mail-yb0-x234.google.com ([2607:f8b0:4002:c09::234]:33367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgjjL-00059U-OL for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 22:06:07 -0500 Received: by mail-yb0-x234.google.com with SMTP id d88so1524203ybi.0 for ; Wed, 22 Feb 2017 19:06:05 -0800 (PST) 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: emacs-orgmode@gnu.org 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