1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-31 11:13:59 +00:00

Fix clock issues related to with-current-buffer

Patch by Bernt Hansen
This commit is contained in:
Carsten Dominik 2009-11-09 22:58:34 +01:00
parent 1d6570928a
commit 9f6102f9e7
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2009-11-09 Carsten Dominik <carsten.dominik@gmail.com>
* org-clock.el (org-clock-out, org-clock-cancel): Revert to
instances to switching to with-current-buffer, because these seem
to cause problems - no idea why.
* org-agenda.el (org-agenda-add-entry-to-org-agenda-diary-file):
Require diary-lib for (diary-date-display-form).

View File

@ -1103,7 +1103,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(if (not (marker-buffer org-clock-marker))
(if fail-quietly (throw 'exit t) (error "No active clock")))
(let (ts te s h m remove)
(with-current-buffer (marker-buffer org-clock-marker)
(save-excursion
(set-buffer (marker-buffer org-clock-marker))
(save-restriction
(widen)
(goto-char org-clock-marker)
@ -1168,7 +1169,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(interactive)
(if (not (marker-buffer org-clock-marker))
(error "No active clock"))
(with-current-buffer (marker-buffer org-clock-marker)
(save-excursion
(set-buffer (marker-buffer org-clock-marker))
(goto-char org-clock-marker)
(delete-region (1- (point-at-bol)) (point-at-eol))
;; Just in case, remove any empty LOGBOOK left over