From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Hinton Subject: Fix for clocking in when org-clock-into-drawer is not a string Date: Thu, 13 Aug 2015 15:32:51 +0100 Message-ID: <87oaib9s30.fsf@turnpike.cse.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPtY3-0007Id-Ov for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 10:32:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPtXy-0000gs-PH for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 10:32:03 -0400 Received: from p01c11o148.mxlogic.net ([208.65.144.71]:54824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPtXy-0000gB-JR for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 10:31:58 -0400 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello, I have encountered a fault in recent versions of org when clocking into a task with a dangling clock when org-clock-into-drawer is an integer rather than a string. It appears the error was a presumption that org-clock-into-drawer would be a string for the construction of a regex. Attached is a trivial single line patch which seems to fix this for me. make test reports no additional test failures with the patch applied. All the best, Tom Hinton --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Fix-clock-in-when-org-clock-into-drawer-is-integer.patch" >From 498b0ae295453e1ce5ef42d54cb8dfb9f930809e Mon Sep 17 00:00:00 2001 From: Tom Hinton Date: Wed, 12 Aug 2015 12:46:47 +0100 Subject: [PATCH] Fix clock in when org-clock-into-drawer is integer * org-clock.el (org-clock-jump-to-current-clock): fixed a bug wherein org-clock-jump-to-current-clock did not work if org-clock-into-drawer was not either a string or nil. This is a TINYCHANGE, although I am happy to assign copyright to the FSF. --- lisp/org-clock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index e44da73..6de093f 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -950,7 +950,7 @@ If necessary, clock-out of the currently active clock." (when drawer (org-with-wide-buffer (let ((drawer-re (format "^[ \t]*:%s:[ \t]*$" - (regexp-quote (or drawer "LOGBOOK")))) + (regexp-quote (if (stringp drawer) drawer "LOGBOOK")))) (beg (save-excursion (outline-back-to-heading t) (point)))) (catch 'exit (while (re-search-backward drawer-re beg t) -- 2.1.4 --=-=-= Content-Type: text/plain -- http://www.cse.org.uk/about-us/staff#Tom-Hinton --=-=-=--