diff options
author | Bastien Guerry <bzg@altern.org> | 2011-03-07 15:21:13 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-03-07 15:21:13 +0100 |
commit | 54c638523d4706d955c9d16cb5f499bcfa92bec9 (patch) | |
tree | c36d845d5cab116660295e0eaf458367146ee6b8 | |
parent | b969081ebd0da2711f1006fec39e04fe4a90ef71 (diff) | |
download | org-mode-54c638523d4706d955c9d16cb5f499bcfa92bec9.tar.gz |
org-capture.el: Rename :no-clock-out to :clock-keep.
(org-capture-templates): Rename :no-clock-out to :clock-keep.
(org-capture): Use :clock-keep instead of :no-clock-out.
Thanks to Bernt Hansen for the suggestion.
-rw-r--r-- | doc/org.texi | 10 | ||||
-rw-r--r-- | lisp/org-capture.el | 14 |
2 files changed, 15 insertions, 9 deletions
diff --git a/doc/org.texi b/doc/org.texi index 7970be8..9a049de 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -6408,12 +6408,14 @@ before and after the new item. Default 0, only common other value is 1. @item :clock-in Start the clock in this item. +@item :clock-keep +Keep the clock running when filing the captured entry. + @item :clock-resume If starting the capture interrupted a clock, restart that clock when finished -with the capture. - -@item :no-clock-out -Don't clock out when filing the captured entry. +with the capture. Note that @code{:clock-keep} has precedence over +@code{:clock-resume}. When setting both to @code{t}, the current clock will +run and the previous one will not be resumed. @item :unnarrowed Do not narrow the target buffer, simply show the full buffer. Default is to diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 241a797..7c09550 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -182,9 +182,12 @@ properties are: :clock-in Start the clock in this item. - :clock-resume Start the interrupted clock when finishing the capture. + :clock-keep Keep the clock running when filing the captured entry. - :no-clock-out Don't clock out when filing the captured entry. + :clock-resume Start the interrupted clock when finishing the capture. + Note that :clock-keep has precedence over :clock-resume. + When setting both to `t', the current clock will run and + the previous one will not be resumed. :unnarrowed Do not narrow the target buffer, simply show the full buffer. Default is to narrow it so that you @@ -318,7 +321,7 @@ calendar | %:type %:date" ((const :format "%v " :immediate-finish) (const t)) ((const :format "%v " :empty-lines) (const 1)) ((const :format "%v " :clock-in) (const t)) - ((const :format "%v " :no-clock-out) (const nil)) + ((const :format "%v " :clock-keep) (const nil)) ((const :format "%v " :clock-resume) (const t)) ((const :format "%v " :unnarrowed) (const t)) ((const :format "%v " :kill-buffer) (const t)))))))) @@ -457,7 +460,7 @@ bypassed." (org-capture-get :key) (nth 1 error)))) (if (org-capture-get :immediate-finish) - (org-capture-finalize nil (not (org-capture-get :no-clock-out))) + (org-capture-finalize nil (not (org-capture-get :clock-keep))) (if (and (org-mode-p) (org-capture-get :clock-in)) (condition-case nil @@ -507,7 +510,8 @@ process should clock-out the captured entry." (< 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 (org-capture-get :clock-resume 'local) + (when (and clock-out + (org-capture-get :clock-resume 'local) (markerp (org-capture-get :interrupted-clock 'local)) (buffer-live-p (marker-buffer (org-capture-get :interrupted-clock 'local)))) |