--- lisp/ChangeLog | 3 +++ lisp/org.el | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42622b0..33eca1a 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,9 @@ (org-clock-in): Use org-indent-line-function to indent clock lines. (org-clock-find-position): Fix indentation of empty clock drawers. + * org.el (org-add-log-setup): Only skip drawers if the are + immediately after the scheduling keywords. + 2008-10-16 Carsten Dominik <[EMAIL PROTECTED]> * org.el (org-add-log-setup): Respect diff --git a/lisp/org.el b/lisp/org.el index 2eb70dd..413ac6c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8392,15 +8392,17 @@ EXTRA is additional text that will be inserted into the notes buffer." (org-back-to-heading t) (narrow-to-region (point) (save-excursion (outline-next-heading) (point))) - (when org-log-state-notes-insert-after-drawers - (while (re-search-forward - (concat "\\(" org-drawer-regexp - "\\|" org-property-end-re "\\)") - (point-max) t) (forward-line))) (looking-at (concat outline-regexp "\\( *\\)[^\r\n]*" "\\(\n[^\r\n]*?" org-keyword-time-not-clock-regexp "[^\r\n]*\\)?")) (goto-char (match-end 0)) + (when (and org-log-state-notes-insert-after-drawers + (save-excursion (forward-line) (looking-at org-drawer-regexp))) + (progn (forward-line) + (while (looking-at org-drawer-regexp) + (goto-char (match-end 0)) + (re-search-forward org-property-end-re (point-max) t) + (forward-line)))) (unless org-log-states-order-reversed (and (= (char-after) ?\n) (forward-char 1)) (org-skip-over-state-notes) -- 1.6.0.2 _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode