From 84bfc688d64dd506b3419b7db4e289d17d6ec4fe Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Fri, 2 Oct 2020 18:08:49 -0400 Subject: [PATCH 1/2] org: Fix a docstring typo * lisp/org.el (org-check-before-invisible-edit): Fix a docstring typo. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index eff85f9e4..bd67e5423 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16564,7 +16564,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 From 8d3610df088acbfe59ce7ef9e244e166c542d657 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Fri, 2 Oct 2020 14:01:35 -0400 Subject: [PATCH 2/2] org-capture.el: Fix heading's position when inserting a template "here" * lisp/org-capture.el (org-capture-place-entry): Fix heading's position when inserting a template "here" with C-0 M-x org-capture. Reported-by: david wen riccardi-zhu Ref: https://orgmode.org/list/877dscaila.fsf@dwrz.net/ --- lisp/org-capture.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index d73e927fc..1e41e4201 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1147,10 +1147,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