From 57e6e0f99495fdb819f57fabd1ff4452eed87189 Mon Sep 17 00:00:00 2001 From: Gustav Wikström Date: Wed, 24 Feb 2021 19:57:39 +0100 Subject: Improve code for narrowing in nroam--insert * nroam.el (nroam--insert): Improve code for narrowing. --- nroam.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nroam.el b/nroam.el index 87855d7..7c3f379 100644 --- a/nroam.el +++ b/nroam.el @@ -192,10 +192,8 @@ Make the region inserted by BODY read-only, and marked with (with-nroam-markers (seq-do #'funcall nroam-sections)) (when (nroam--sections-inserted-p) - (goto-char (+ p 1)) ; maybe to implicit. But loc. of new - ; backlinks section (save-restriction - (org-narrow-to-subtree) + (narrow-to-region p (point-max)) (org-set-startup-visibility))))))) (defun nroam--get-backlinks () -- cgit v1.2.3-54-g00ecf