Browse Source

Incude note when clock entry gets moved into a drawer.

Carsten Dominik 17 years ago
parent
commit
785cde4d2b
3 changed files with 7 additions and 1 deletions
  1. 5 0
      lisp/ChangeLog
  2. 1 0
      lisp/org-clock.el
  3. 1 1
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-09-13  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org-clock.el (org-clock-find-position): Make sure the note after
+	the clock line gets moved into the new clock drawer.
+
 2008-09-11  Carsten Dominik  <dominik@science.uva.nl>
 2008-09-11  Carsten Dominik  <dominik@science.uva.nl>
 
 
 	* org-id.el (org-id-new): New option.
 	* org-id.el (org-id-new): New option.

+ 1 - 0
lisp/org-clock.el

@@ -306,6 +306,7 @@ the clocking selection, associated with the letter `d'."
 	;; Wrap current entries into a new drawer
 	;; Wrap current entries into a new drawer
 	(goto-char last)
 	(goto-char last)
 	(beginning-of-line 2)
 	(beginning-of-line 2)
+	(if (org-at-item-p) (org-end-of-item))
 	(insert ":END:\n")
 	(insert ":END:\n")
 	(beginning-of-line 0)
 	(beginning-of-line 0)
 	(org-indent-line-function)
 	(org-indent-line-function)

+ 1 - 1
lisp/org.el

@@ -9000,7 +9000,7 @@ This is done in the same way as adding a state change note."
   (interactive)
   (interactive)
   (org-add-log-setup 'note nil t nil))
   (org-add-log-setup 'note nil t nil))
 
 
-(defun org-add-log-setup (&optional purpose state findpos how extra)
+(defun org-add-log-setup (&optional purpose state findpos how &optional extra)
   "Set up the post command hook to take a note.
   "Set up the post command hook to take a note.
 If this is about to TODO state change, the new state is expected in STATE.
 If this is about to TODO state change, the new state is expected in STATE.
 When FINDPOS is non-nil, find the correct position for the note in
 When FINDPOS is non-nil, find the correct position for the note in