summaryrefslogtreecommitdiff
path: root/lisp/org/org-clock.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-clock.el')
-rw-r--r--lisp/org/org-clock.el32
1 files changed, 18 insertions, 14 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index ddb0424ef4b..d25f68debeb 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -6,7 +6,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
;;
;; This file is part of GNU Emacs.
;;
@@ -678,22 +678,26 @@ was started."
(save-window-excursion
(save-excursion
(unless org-clock-resolving-clocks-due-to-idleness
- (org-with-clock clock
- (org-clock-goto))
+ (org-with-clock clock (org-clock-goto))
(with-current-buffer (marker-buffer (car clock))
(goto-char (car clock))
(if org-clock-into-drawer
- (ignore-errors
- (outline-flag-region (save-excursion
- (outline-back-to-heading t)
- (search-forward ":LOGBOOK:")
- (goto-char (match-beginning 0)))
- (save-excursion
- (outline-back-to-heading t)
- (search-forward ":LOGBOOK:")
- (search-forward ":END:")
- (goto-char (match-end 0)))
- nil)))))
+ (let ((logbook
+ (if (stringp org-clock-into-drawer)
+ (concat ":" org-clock-into-drawer ":")
+ ":LOGBOOK:")))
+ (ignore-errors
+ (outline-flag-region
+ (save-excursion
+ (outline-back-to-heading t)
+ (search-forward logbook)
+ (goto-char (match-beginning 0)))
+ (save-excursion
+ (outline-back-to-heading t)
+ (search-forward logbook)
+ (search-forward ":END:")
+ (goto-char (match-end 0)))
+ nil))))))
(let (char-pressed)
(while (null char-pressed)
(setq char-pressed