Ensure that top-level capture targets are pasted at level 1

* lisp/org-capture.el: (org-capture-place-entry) Ensure that level is
  set to 1 (i.e., the top level) if there is no headline target
  defined. Otherwise, captured items are improperly nested by context.
This commit is contained in:
Matt Lundin 2017-09-09 11:08:06 -05:00 committed by Nicolas Goaziou
parent e0259f9374
commit 2dfbafa4a9

View file

@ -1097,7 +1097,7 @@ may have been stored before."
(defun org-capture-place-entry ()
"Place the template as a new Org entry."
(let ((reversed? (org-capture-get :prepend))
level)
(level 1))
(when (org-capture-get :exact-position)
(goto-char (org-capture-get :exact-position)))
(cond