Hello, I'll explain the problem with this example:
---- * Run this in =emacs -Q= with the latest org #+BEGIN_SRC emacs-lisp ;(add-to-list 'load-path "~/build/org-mode/lisp") ;;; ensure we are using the latest Org (setq org-capture-templates (quote (("x" "Testing" item (file+headline "~/org/Testing.org" "Test headline") "- %U Thoughts:" :prepend t)))) (setq org-log-into-drawer t) #+END_SRC * TODO Test headline SCHEDULED: <2017-06-09 Fri +1d> :PROPERTIES: :LAST_REPEAT: [2017-06-08 Thu 12:11] :END: :LOGBOOK: - State "DONE" from "TODO" [2017-06-08 Thu 12:11] :END: - I would expect the capture to go immediately above this line, but it goes in the drawer instead. ---- If I use org-capture with template "x", the entry is placed into the LOGBOOK drawer above the state change line. Of course, if org-log-into-drawer set to nil, there is no good way of keeping the state change list and the capture list separate at all (nor should there be, IMO, as long as org-habit doesn't get confused). But at least with the logbook drawer enabled, the current behavior seems wrong.