summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-11-20 12:02:52 +0100
committerQuentin Aristote <quentin@aristote.fr>2021-11-20 12:02:52 +0100
commit1722b92020f0548ab845f7b2bb0a1fca548e9d34 (patch)
tree70c669226b0ee8d93be9328fd4e056438237a110
parentdc82301810d480baf043e11af0e61b7a46fcbc9f (diff)
add movement commands
-rw-r--r--local/bibli-paris/bibli-paris.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/local/bibli-paris/bibli-paris.el b/local/bibli-paris/bibli-paris.el
index 108e5c2..f29cb6f 100644
--- a/local/bibli-paris/bibli-paris.el
+++ b/local/bibli-paris/bibli-paris.el
@@ -406,6 +406,25 @@ STATE (string)."
(setq org-map-continue-from (outline-get-last-sibling))
)))))
+
+;; move between entries
+
+(defun bibli-paris/change-entry (move-fun)
+ "Run the MOVE-FUN function and put forward the resulting entry at point."
+ (org-hide-entry)
+ (funcall move-fun)
+ (org-show-subtree)
+ (recenter))
+
+(defun bibli-paris/previous-entry ()
+ "Move to and put forward the previous entry."
+ (bibli-paris/change-entry 'outline-get-last-sibling))
+
+(defun bibli-paris/next-entry ()
+ "Move to and put forward the next entry."
+ (bibli-paris/change-entry 'outline-get-next-sibling))
+
+
;; minor mode
;;;###autoload