From 51f9e066436b490c6be969e659155b34bb87f87d Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sat, 11 Dec 2021 11:55:01 +0100 Subject: autoload mode --- local/bibli-paris/bibli-paris.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'local') diff --git a/local/bibli-paris/bibli-paris.el b/local/bibli-paris/bibli-paris.el index ca00fab..10839e2 100644 --- a/local/bibli-paris/bibli-paris.el +++ b/local/bibli-paris/bibli-paris.el @@ -461,11 +461,13 @@ STATE (string)." (org-show-subtree) (recenter)) +;;;###autoload (defun bibli-paris/previous-entry () "Move to and put forward the previous entry." (interactive) (bibli-paris/change-entry 'outline-get-last-sibling)) +;;;###autoload (defun bibli-paris/next-entry () "Move to and put forward the next entry." (interactive) @@ -474,26 +476,31 @@ STATE (string)." ;; change the state of an entry +;;;###autoload (defun bibli-paris/set-to-todo () "Switch the entry at point to the TODO state." (interactive) (org-todo "TODO")) +;;;###autoload (defun bibli-paris/set-to-next () "Switch the entry at point to the NEXT state." (interactive) (org-todo "NEXT")) +;;;###autoload (defun bibli-paris/set-to-booked () "Switch the entry at point to the BOOKED state." (interactive) (org-todo "BOOKED")) +;;;###autoload (defun bibli-paris/set-to-done () "Switch the entry at point to the DONE state." (interactive) (org-todo "DONE")) + ;; minor mode ;;;###autoload @@ -501,4 +508,11 @@ STATE (string)." "Manage reading lists of documents available in Paris' libraries." :lighter "bibli-paris") +(add-hook 'find-file-hook + (lambda () + (when (and (string= (file-name-base buffer-file-name) "Bibliothèques de Paris") + (string-prefix-p "org" (file-name-extension buffer-file-name))) + (bibli-paris/mode +1)))) + + (provide 'bibli-paris) -- cgit v1.2.3