diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-02-03 22:46:15 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-02-03 22:46:15 +0100 |
commit | 9eda09eab43f6d7ebe826a917b26f9bce48d9d29 (patch) | |
tree | 8119cba9b611a810fa9fa04751364d8cc14cecfe | |
parent | 6da9d0a416090df0491a81d48a62e0b8569a80ad (diff) | |
download | org-mode-9eda09eab43f6d7ebe826a917b26f9bce48d9d29.tar.gz |
Notes associated to CLOCKs are located after the clock
* lisp/org.el (org-store-log-note): Make sure a note added after
clocking out is inserted right after the CLOCK line.
Reported-by: Jorge Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111795>
-rw-r--r-- | lisp/org.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index 38ce7fb..1c514d4 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13894,7 +13894,10 @@ EXTRA is additional text that will be inserted into the notes buffer." ;; Find location for the new note. (goto-char org-log-note-marker) (set-marker org-log-note-marker nil) - (goto-char (org-log-beginning t)) + ;; Note associated to a clock is to be located right after + ;; the clock. Do not move point. + (unless (eq org-log-note-purpose 'clock-out) + (goto-char (org-log-beginning t))) ;; Make sure point is at the beginning of an empty line. (cond ((not (bolp)) (let ((inhibit-read-only t)) (insert "\n"))) ((looking-at "[ \t]*\\S-") (save-excursion (insert "\n")))) |