From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Ridolfi Subject: Re: Bug: :clock-keep...not kept [7.5 commit-078c01bf3b1742b1015fac9f5bab3a429505f3c6] Date: Thu, 07 Apr 2011 13:31:46 +0200 Message-ID: <83pqoyfgbh.fsf@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=60680 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7nQ7-0002ED-OQ for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 07:30:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7nQ6-0006km-Er for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 07:30:39 -0400 Received: from nm5.bullet.mail.ukl.yahoo.com ([217.146.182.226]:46813) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q7nQ6-0006kg-4q for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 07:30:38 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Cc: Bernt Hansen , Carsten Dominik Hello everyone, I think I found a bug with the option ":clock-keep" :clock-keep' Keep the clock running when filing the captured entry. Emacs : GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO Package: Org-mode version 7.5 commit-4168fccdc7eab648d9c4517afe56765aaa1e9664 The option was introduced on 2011-03-07, by Bastien, in commit: b969081ebd0da2711f1006fec39e04fe4a90ef71 : org-capture.el: new :no-clock-out template option. and, after Carsten chimed in, message: http://article.gmane.org/gmane.emacs.orgmode/38951 Bastien: > See my previous message -- I used :no-clock-out to stick to the default > behavior and avoid users to have to change their config. Let me know if > this is okay for you! I like this decision, because of the templates is asked to clock in, it seems natural for me that it will clock out when it is done. This only suggestion I would have is it maybe call the property :clock-keep-running. No sure though. -------------------------------------------------- in commit 54c638523d4706d955c9d16cb5f499bcfa92bec9 : org-capture.el: Rename :no-clock-out to :clock-keep. The thread with the complete discussion is here: http://thread.gmane.org/gmane.emacs.orgmode/38485 I tried to look at the code to understand it, but it is beyond my skills. On the other hand I did some tests: ** set up - beware I'm under Windows. (for Bernt's set up (linuxish) please refer to message http://thread.gmane.org/gmane.emacs.orgmode/38485 ) My minimal.emacs --8<---------------cut here---------------start------------->8-- (add-to-list 'load-path (expand-file-name "c:/Documents and Settings/my-path/org/lisp")) (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (require 'org-install) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) (global-set-key "\C-cc" 'org-capture) (setq org-capture-templates (quote (("t" "todo" entry (file "c:/Documents and Settings/my-path/a.org") "* TODO %? %U %a " :immediate-finish t :clock-in t :clock-keep t)))) --8<---------------cut here---------------end--------------->8--- I run emacs with: c:\path\> emacs -q -l ~/minimal.emacs C-c c t to call the template. Fill it in and C-c C-c to close. I have modified the properties in the last row: ** if :immediate-finish nil :clock-in t :clock-keep t the clock in clocks-in BUT the clock is not kept, it is closed anyway. ** without immediate-finish ** if :clock-in t :clock-keep t the clock in clocks-in BUT the clock is not kept, it is closed anyway. cheers, Giovanni P.S. Side effect (very emacsish). While testing I found an unexpected behaviour with :clock-resume ** if :immediate-finish t :clock-in t :clock-resume t *** and If there is no clock to be resumed the clock-in does not clock-in in the capture buffer. Is this a bug? Shall be thrown a message: "No clock to be resumed"? *** If there is clock to be resumed the clock is resumed. It works.