summaryrefslogtreecommitdiffstatshomepage
path: root/nroam.el
diff options
context:
space:
mode:
authorGravatar Nicolas Petton2021-03-19 13:27:19 +0100
committerGravatar GitHub2021-03-19 13:27:19 +0100
commit9c75bb316bb8769a9cb7a6f6c11225ba482befbd (patch)
tree894fae73bd2078b5a719a85702f11d2012ebf6e8 /nroam.el
parente6bd64814e4cb3b2ef0168b05245618eea435276 (diff)
parentd7de243272f3f2bf7177ad81c5137b4ad97c15dd (diff)
downloadnroam-9c75bb316bb8769a9cb7a6f6c11225ba482befbd.tar.gz
nroam-9c75bb316bb8769a9cb7a6f6c11225ba482befbd.zip
Merge pull request #24 from NicolasPetton/add-goto-section
Add nroam-goto
Diffstat (limited to 'nroam.el')
-rw-r--r--nroam.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/nroam.el b/nroam.el
index 6900d08..d2982aa 100644
--- a/nroam.el
+++ b/nroam.el
@@ -142,6 +142,12 @@ Make the region inserted by BODY read-only, and marked with
(and (markerp nroam-start-marker)
(marker-position nroam-start-marker)))
+(defun nroam-goto ()
+ "Move point to the beginning of nroam sections if any."
+ (interactive)
+ (when (nroam--sections-inserted-p)
+ (setf (point) (marker-position nroam-start-marker))))
+
(defun nroam--prune ()
"Remove nroam sections from the current buffer."
(let ((inhibit-read-only t))