From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: BUG: Capture task clocking doesn't stop due to narrowing Date: Sat, 16 Mar 2019 16:42:41 -0400 Message-ID: <87woky8sam.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5GHB-0008TM-CD for emacs-orgmode@gnu.org; Sat, 16 Mar 2019 16:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5G8q-0000OF-HE for emacs-orgmode@gnu.org; Sat, 16 Mar 2019 16:42:54 -0400 Received: from outbound1a.eu.mailhop.org ([52.58.109.202]:40310) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h5G8o-0000JL-Rc for emacs-orgmode@gnu.org; Sat, 16 Mar 2019 16:42:52 -0400 Received: from localhost.localdomain (gollum.intra.norang.ca [192.168.1.5]) by thorin.intra.norang.ca (8.15.2/8.15.2/Debian-8) with ESMTPS id x2GKggEW029479 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 16 Mar 2019 16:42:43 -0400 Received: from localhost.localdomain (gollum [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id x2GKgfOm025165 for ; Sat, 16 Mar 2019 16:42:41 -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" To: emacs-orgmode@gnu.org Hi, I ran into an issue this morning where my capture task continues clocking on save. This occurs in both master and maint when not clocking into a drawer. ECM follows. --- test.org ------------------------------------------------------------------- #+TITLE: BUG: Capture with clocking does not stop the clock due to narrowing *Keys To Reproduce* 1) Capture a new entry C-c c w 2) Save entry - clock should stop but doesn't C-c C-c The clock is still running after save but should have been stopped. The clock was not included in the narrowed buffer in the capture window. If we widen the buffer before saving the clock is stopped normally. Same results in both maint and master branch. CLOCK changed to KLOCK in example below to avoid before first headline error. The clock line is being picked up even though it is inside an example block and the clock resolution code is trying to deal with it. #+begin_example ,* Tasks ,* Work Log ,** DONE Capture bug details KLOCK: [2019-03-16 Sat 16:09] ,* Personal Log #+end_example GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17 Org mode version 9.2.2 (release_9.2.2-312-gce1681 @ c:/D-Drive/bin/org-mode/lisp/) * Tasks * Work Log * Personal Log --- minimal.emacs -------------------------------------------------------------- (add-to-list 'load-path "C:/D-Drive/bin/org-mode/lisp/") (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\)$" . org-mode)) (require 'org) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) --- test.el -------------------------------------------------------------------- (global-set-key (kbd "C-c c") 'org-capture) ;; Save clock data and state changes and notes in the LOGBOOK drawer (setq org-clock-into-drawer 4) (setq org-adapt-indentation nil) (setq org-capture-templates (quote (("t" "Todo" entry (file "~/test.org") "* TODO %?\n\n%x\n" :clock-in t :clock-resume t) ("p" "Personal Log" entry (file+olp "~/test.org" "Personal Log") "* DONE %?\n" :clock-in t :clock-resume t) ("w" "Work Log" entry (file+olp "~/test.org" "Work Log") "* DONE %?\n" :clock-in t :clock-resume t)))) --- windows icon properties to start minimal emacs ----------------------------- C:\D-Drive\bin\emacs-25.1\bin\runemacs.exe -q -l ~/minimal.emacs -l ~/test.el ~/test.org Regards, Bernt