1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00

(org-resolve-clocks): Changed meaning of an argument

This commit is contained in:
John Wiegley 2010-05-16 13:20:39 -04:00 committed by Carsten Dominik
parent 3128e93340
commit 99afb931b2
2 changed files with 7 additions and 4 deletions

View File

@ -13,6 +13,9 @@
(org-clock-resolve-expert): New customization variable.
(org-find-open-clocks): Fixed a bug that caused discovered
clocks not to match up with the currently active clock.
(org-resolve-clocks): Changed the argument
`also-non-dangling-p' to `only-dangling-p', since due to a bug
this was the default behavior all along.
2010-05-15 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -832,10 +832,10 @@ to be CLOCKED OUT.")))
(not (memq ch '(?K ?G ?S ?C))))
fail-quietly)))))
(defun org-resolve-clocks (&optional also-non-dangling-p prompt-fn last-valid)
(defun org-resolve-clocks (&optional only-dangling-p prompt-fn last-valid)
"Resolve all currently open org-mode clocks.
If `also-non-dangling-p' is non-nil, also ask to resolve
non-dangling (i.e., currently open and valid) clocks."
If `only-dangling-p' is non-nil, only ask to resolve dangling
\(i.e., not currently open and valid) clocks."
(interactive "P")
(unless org-clock-resolving-clocks
(let ((org-clock-resolving-clocks t))
@ -844,7 +844,7 @@ non-dangling (i.e., currently open and valid) clocks."
(dolist (clock clocks)
(let ((dangling (or (not (org-clock-is-active))
(/= (car clock) org-clock-marker))))
(unless (and (not dangling) (not also-non-dangling-p))
(if (or (not only-dangling-p) dangling)
(org-clock-resolve
clock
(or prompt-fn