emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Giovanni Ridolfi <giovanni.ridolfi@yahoo.it>
Cc: Org Mode <emacs-orgmode@gnu.org>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Bug: :clock-keep...not kept [7.5 commit-078c01bf3b1742b1015fac9f5bab3a429505f3c6]
Date: Thu, 07 Apr 2011 22:09:16 -0400	[thread overview]
Message-ID: <87wrj5335f.fsf@norang.ca> (raw)
In-Reply-To: 83pqoyfgbh.fsf@yahoo.it

Hi Giovanni,

Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> 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
>

<snip>

> 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
> (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))))  
>
> 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. 

I can reproduce this problem.

I think :immediate-finish never clocks in at all which is
why :clock-keep is not doing anything in this case.

I think this is a bug and the clock should probably be started and kept
in the new capture task.

>
> **    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. 

I can reproduce this problem as well.

I don't currently have a use case for :clock-keep so I'm not currently
using this feature in my templates.

I agree the clock should probably be started and kept in the new capture
task.


>
> 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.

I think this is intended behaviour.  If a clock is not already running
before you start the capture then there is no task to resume the clock
on.  In this case the clock stops after the capture is finalized.

Is throwing an error message for this really useful?

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11
on raven, modified by Debian

Regards,
Bernt

  reply	other threads:[~2011-04-08  2:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 11:31 Bug: :clock-keep...not kept [7.5 commit-078c01bf3b1742b1015fac9f5bab3a429505f3c6] Giovanni Ridolfi
2011-04-08  2:09 ` Bernt Hansen [this message]
2011-04-08 11:30   ` SOLVED Bug: :clock-keep...not kept [7.5__078c01] Giovanni Ridolfi
2011-04-08 12:21     ` Bernt Hansen
2011-04-08 14:54       ` Giovanni Ridolfi
2011-04-08 16:10         ` Bastien
2011-04-08 16:07       ` Bastien
2011-04-11 13:41         ` [PATCH] " Giovanni Ridolfi
2011-05-13 12:50           ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2011-03-23  9:25 Bug: :clock-keep...not kept [7.5 commit-078c01bf3b1742b1015fac9f5bab3a429505f3c6] Giovanni Ridolfi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wrj5335f.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=giovanni.ridolfi@yahoo.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).