diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 67c58ffdd..020feb4d6 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1150,10 +1150,11 @@ may have been stored before." (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)))) + (if (or (org-at-heading-p) + (ignore-errors + (save-excursion (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 diff --git a/lisp/org.el b/lisp/org.el index 7438b9944..b222ea20c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16577,7 +16577,7 @@ overwritten, and the table is not marked as requiring realignment." (1+ org-self-insert-command-undo-counter)))))))) (defun org-check-before-invisible-edit (kind) - "Check is editing if kind KIND would be dangerous with invisible text around. + "Check if editing kind KIND would be dangerous with invisible text around. The detailed reaction depends on the user option `org-catch-invisible-edits'." ;; First, try to get out of here as quickly as possible, to reduce overhead (when (and org-catch-invisible-edits