mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-03 11:33:46 +00:00
Fix clock issues related to with-current-buffer
Patch by Bernt Hansen
This commit is contained in:
parent
1d6570928a
commit
9f6102f9e7
@ -1,5 +1,9 @@
|
|||||||
2009-11-09 Carsten Dominik <carsten.dominik@gmail.com>
|
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):
|
* org-agenda.el (org-agenda-add-entry-to-org-agenda-diary-file):
|
||||||
Require diary-lib for (diary-date-display-form).
|
Require diary-lib for (diary-date-display-form).
|
||||||
|
|
||||||
|
@ -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 (not (marker-buffer org-clock-marker))
|
||||||
(if fail-quietly (throw 'exit t) (error "No active clock")))
|
(if fail-quietly (throw 'exit t) (error "No active clock")))
|
||||||
(let (ts te s h m remove)
|
(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
|
(save-restriction
|
||||||
(widen)
|
(widen)
|
||||||
(goto-char org-clock-marker)
|
(goto-char org-clock-marker)
|
||||||
@ -1168,7 +1169,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
|
|||||||
(interactive)
|
(interactive)
|
||||||
(if (not (marker-buffer org-clock-marker))
|
(if (not (marker-buffer org-clock-marker))
|
||||||
(error "No active clock"))
|
(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)
|
(goto-char org-clock-marker)
|
||||||
(delete-region (1- (point-at-bol)) (point-at-eol))
|
(delete-region (1- (point-at-bol)) (point-at-eol))
|
||||||
;; Just in case, remove any empty LOGBOOK left over
|
;; Just in case, remove any empty LOGBOOK left over
|
||||||
|
Loading…
Reference in New Issue
Block a user