Keep it simple

This commit is contained in:
Gerard Vermeulen 2024-02-04 12:11:20 +01:00
parent afa5e0470c
commit 29fff0ce0f
1 changed files with 9 additions and 21 deletions

View File

@ -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