Browse Source

org-capture.el: new :no-clock-out template option.

* org-capture.el (org-capture-templates): New option
:no-clock-out.
(org-capture): Use the new option.

* org.texi (Template elements): document the new template
option :no-clock-out.
Bastien Guerry 14 years ago
parent
commit
b969081ebd
2 changed files with 7 additions and 1 deletions
  1. 3 0
      doc/org.texi
  2. 4 1
      lisp/org-capture.el

+ 3 - 0
doc/org.texi

@@ -6412,6 +6412,9 @@ Start the clock in this item.
 If starting the capture interrupted a clock, restart that clock when finished
 If starting the capture interrupted a clock, restart that clock when finished
 with the capture.
 with the capture.
 
 
+@item :no-clock-out
+Don't clock out when filing the captured entry.
+
 @item :unnarrowed
 @item :unnarrowed
 Do not narrow the target buffer, simply show the full buffer.  Default is to
 Do not narrow the target buffer, simply show the full buffer.  Default is to
 narrow it so that you only see the new material.
 narrow it so that you only see the new material.

+ 4 - 1
lisp/org-capture.el

@@ -184,6 +184,8 @@ properties are:
 
 
  :clock-resume       Start the interrupted clock when finishing the capture.
  :clock-resume       Start the interrupted clock when finishing the capture.
 
 
+ :no-clock-out       Don't clock out when filing the captured entry.
+
  :unnarrowed         Do not narrow the target buffer, simply show the
  :unnarrowed         Do not narrow the target buffer, simply show the
                      full buffer.  Default is to narrow it so that you
                      full buffer.  Default is to narrow it so that you
                      only see the new stuff.
                      only see the new stuff.
@@ -316,6 +318,7 @@ calendar                |  %:type %:date"
 			    ((const :format "%v " :immediate-finish) (const t))
 			    ((const :format "%v " :immediate-finish) (const t))
 			    ((const :format "%v " :empty-lines) (const 1))
 			    ((const :format "%v " :empty-lines) (const 1))
 			    ((const :format "%v " :clock-in) (const t))
 			    ((const :format "%v " :clock-in) (const t))
+			    ((const :format "%v " :no-clock-out) (const nil))
 			    ((const :format "%v " :clock-resume) (const t))
 			    ((const :format "%v " :clock-resume) (const t))
 			    ((const :format "%v " :unnarrowed) (const t))
 			    ((const :format "%v " :unnarrowed) (const t))
 			    ((const :format "%v " :kill-buffer) (const t))))))))
 			    ((const :format "%v " :kill-buffer) (const t))))))))
@@ -454,7 +457,7 @@ bypassed."
 		    (org-capture-get :key)
 		    (org-capture-get :key)
 		    (nth 1 error))))
 		    (nth 1 error))))
 	  (if (org-capture-get :immediate-finish)
 	  (if (org-capture-get :immediate-finish)
-	      (org-capture-finalize nil t)
+	      (org-capture-finalize nil (not (org-capture-get :no-clock-out)))
 	    (if (and (org-mode-p)
 	    (if (and (org-mode-p)
 		     (org-capture-get :clock-in))
 		     (org-capture-get :clock-in))
 		(condition-case nil
 		(condition-case nil