From 1722b92020f0548ab845f7b2bb0a1fca548e9d34 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sat, 20 Nov 2021 12:02:52 +0100 Subject: add movement commands --- local/bibli-paris/bibli-paris.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- cgit v1.2.3