emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Frederic Couchet <fcouchet@april.org>
To: emacs-orgmode@gnu.org
Subject: Re: [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task
Date: Mon, 04 Apr 2011 12:17:18 +0200	[thread overview]
Message-ID: <874o6egw29.fsf@april.org> (raw)
In-Reply-To: 878vvsr0wu.fsf@norang.ca

>>>>> "Bernt" == Bernt Hansen <bernt@norang.ca> writes:

    Bernt> Hi Frederic,

    Bernt> So does this mean it's fixed in origin/master but broken in
    Bernt> release_7.5?  Is your original task in the same file as the
    Bernt> target of your capture?

Yes, it is.

    Bernt> There were a few fixes to the codebase for clocking after the
    Bernt> 7.5 release.

Ok.

That works with the git version, that is the main thing.

Here is the diff between the 7.5 version and git version.

--- org-7.5/lisp/org-capture.el	2011-03-07 15:29:01.000000000 +0100
+++ org-7.5-git/lisp/org-capture.el	2011-03-30 16:46:41.000000000 +0200
@@ -54,7 +54,7 @@
 (require 'org-mks)
 
 (declare-function org-datetree-find-date-create "org-datetree"
-		  (DATE &optional KEEP-RESTRICTION))
+		  (date &optional keep-restriction))
 (declare-function org-table-get-specials "org-table" ())
 (declare-function org-table-goto-line "org-table" (N))
 (defvar org-remember-default-headline)
@@ -460,7 +460,7 @@
 		    (org-capture-get :key)
 		    (nth 1 error))))
 	  (if (org-capture-get :immediate-finish)
-	      (org-capture-finalize nil (not (org-capture-get :clock-keep)))
+	      (org-capture-finalize nil (org-capture-get :clock-keep))
 	    (if (and (org-mode-p)
 		     (org-capture-get :clock-in))
 		(condition-case nil
@@ -491,12 +491,12 @@
      (t (setq txt "* Invalid capture template")))
     (org-capture-put :template txt)))
 
-(defun org-capture-finalize (&optional stay-with-capture clock-out)
+(defun org-capture-finalize (&optional stay-with-capture clock-keep)
   "Finalize the capture process.
 With prefix argument STAY-WITH-CAPTURE, jump to the location of the
 captured item after finalizing.
 A second optional argument tells whether finalizing the capture
-process should clock-out the captured entry."
+process should keep the clock running in the filed entry."
   (interactive "P")
   (unless (and org-capture-mode
 	       (buffer-base-buffer (current-buffer)))
@@ -509,8 +509,8 @@
 	     (> org-clock-marker (point-min))
 	     (< org-clock-marker (point-max)))
     ;; Looks like the clock we started is still running.  Clock out.
-    (when clock-out (let (org-log-note-clock-out) (org-clock-out)))
-    (when (and clock-out
+    (when (not clock-keep) (let (org-log-note-clock-out) (org-clock-out)))
+    (when (and (not clock-keep)
 	       (org-capture-get :clock-resume 'local)
 	       (markerp (org-capture-get :interrupted-clock 'local))
 	       (buffer-live-p (marker-buffer

Librement,
Fred.

      reply	other threads:[~2011-04-04 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02 13:41 [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task Frederic Couchet
2011-04-02 17:57 ` Bernt Hansen
2011-04-04 10:17   ` Frederic Couchet [this message]

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=874o6egw29.fsf@april.org \
    --to=fcouchet@april.org \
    --cc=emacs-orgmode@gnu.org \
    /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).