From 29fff0ce0f103074fde89acd36097fb0aadc06b8 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 4 Feb 2024 12:11:20 +0100 Subject: [PATCH] Keep it simple --- README.org | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/README.org b/README.org index f9944a3..e5f940b 100644 --- a/README.org +++ b/README.org @@ -2361,28 +2361,16 @@ list detailing and motivating each listing: #+caption: Undo calling =org-ctags-enable=. #+name: lst:undo-org-ctags #+begin_src emacs-lisp -n :results silent +;; See also `org-link-search-must-match-exact-headline' for link searches. +;; Undo calling `org-ctags-enable'. For what may cause `org-ctags' +;; loading, see: https://list.orgmode.org/87mt43agk6.fsf@localhost/ +(defun org-ctags-disable () + "Undo calling `org-ctags-enable'." + (setq org-ctags-enabled-p nil) + (setq org-open-link-functions nil) + (put 'org-mode 'find-tag-default-function nil)) + (with-eval-after-load 'org-ctags - ;; See also `org-link-search-must-match-exact-headline' for link searches. - ;; Undo calling `org-ctags-enable'. For what may cause `org-ctags' - ;; loading, see: https://list.orgmode.org/87mt43agk6.fsf@localhost/ - (defun org-ctags-disable () - "Undo calling `org-ctags-enable'." - (put 'org-mode 'find-tag-default-function nil) - (setq org-ctags-enabled-p nil) - ;; Use the `:options' list from the `org-ctags-open-link-functions' code. - (let ((options '(org-ctags-find-tag - org-ctags-ask-rebuild-tags-file-then-find-tag - org-ctags-rebuild-tags-file-then-find-tag - org-ctags-ask-append-topic - org-ctags-append-topic - org-ctags-ask-visit-buffer-or-file - org-ctags-visit-buffer-or-file - org-ctags-fail-silently)) - (fns org-open-link-functions)) - (dolist (fn options) - (setq fns (delq fn fns))) - ;; Reset `org-open-link-functions' after removal of prepended functions. - (setq org-open-link-functions fns))) (org-ctags-disable)) #+end_src