|
@@ -1144,7 +1144,13 @@ may have been stored before."
|
|
|
(when exact-position (goto-char exact-position))
|
|
|
(cond
|
|
|
;; Force insertion at point.
|
|
|
- ((org-capture-get :insert-here) nil)
|
|
|
+ (insert-here?
|
|
|
+ ;; FIXME: level should probably set directly within (let ...).
|
|
|
+ (setq level (org-get-valid-level
|
|
|
+ (if (or (org-at-heading-p)
|
|
|
+ (ignore-errors (org-back-to-heading t)))
|
|
|
+ (org-outline-level)
|
|
|
+ 1))))
|
|
|
;; Insert as a child of the current entry.
|
|
|
((org-capture-get :target-entry-p)
|
|
|
(setq level (org-get-valid-level
|