Make `org-ctags-enable' a better citizen, but maybe to good.

This commit is contained in:
Gerard Vermeulen 2024-02-06 09:34:05 +01:00
parent 194a0062c1
commit c2fd64717e

View File

@ -2371,7 +2371,17 @@ list detailing and motivating each listing:
(defun org-ctags-disable ()
"Undo calling `org-ctags-enable'."
(setq org-ctags-enabled-p nil)
(setq org-open-link-functions nil)
;; Steal the options list from the `org-ctags-open-link-functions' code.
(setq org-open-link-functions
(seq-difference org-open-link-functions
'(org-ctags-append-topic
org-ctags-ask-append-topic
org-ctags-ask-rebuild-tags-file-then-find-tag
org-ctags-ask-visit-buffer-or-file
org-ctags-fail-silently
org-ctags-find-tag
org-ctags-rebuild-tags-file-then-find-tag
org-ctags-visit-buffer-or-file)))
(put 'org-mode 'find-tag-default-function nil))
(with-eval-after-load 'org-ctags