forked from mirrors/org-mode
org-clock.el (org-clock-out): Fix bug.
* org-clock.el (org-clock-out): Fix bug: if a closing note needs to be stored in the drawer where clocks are stored, let's temporarily remove `org-clock-remove-empty-clock-drawer' from `org-clock-out-hook'. Thanks to Дядов Васил Стоянов for reporting this bug.
This commit is contained in:
parent
c8d5674562
commit
3b21f246d6
|
@ -1524,7 +1524,15 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
|
|||
(force-mode-line-update)
|
||||
(message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m
|
||||
(if remove " => LINE REMOVED" ""))
|
||||
(run-hooks 'org-clock-out-hook)
|
||||
(let ((h org-clock-out-hook))
|
||||
;; If a closing note needs to be stored in the drawer
|
||||
;; where clocks are stored, let's temporarily disable
|
||||
;; `org-clock-remove-empty-clock-drawer'
|
||||
(if (and (equal org-clock-into-drawer org-log-into-drawer)
|
||||
(eq org-log-done 'note)
|
||||
org-clock-out-when-done)
|
||||
(setq h (delq 'org-clock-remove-empty-clock-drawer h)))
|
||||
(mapc (lambda (f) (funcall f)) h))
|
||||
(unless (org-clocking-p)
|
||||
(org-clock-delete-current)))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue