diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-12 02:04:24 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-13 05:08:55 -0500 |
commit | 1affd3bbb6f38487089c8ff13cf6c7297fcf63d6 (patch) | |
tree | cfd6c1f802edf14c7caec3a75facd7d7017e2690 | |
parent | 2b528343557b4ff08af8efb283f01b5d231a7fc4 (diff) | |
download | org-mode-1affd3bbb6f38487089c8ff13cf6c7297fcf63d6.tar.gz |
Check whether org-clock-into-string is a string
-rwxr-xr-x | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/org-clock.el | 30 |
2 files changed, 22 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 375ac27..6677764 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-12 John Wiegley <jwiegley@gmail.com> + + * org-clock.el (org-clock-resolve): If `org-clock-into-string' is + a string, use that to find the LOGBOOK drawer. + 2009-11-12 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-clone-subtree-with-time-shift): Make it work at the diff --git a/lisp/org-clock.el b/lisp/org-clock.el index ddb0424..e787c26 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -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 |