fix(org): initialize eldoc in org-mode buffers
A recent change upstream (see emacsmirror/org-contrib@6e208c87bf) removed the autoload for adding org-eldoc-load to org-mode-hook, so we have to add the hook ourselves (the function is still autoloaded, fortunately). Also moves org-eldoc config into its own use-package! block. Fix: #7633 Ref: emacsmirror/org-contrib@6e208c87bf
This commit is contained in:
parent
b00a01ea06
commit
ab85fd4322
1 changed files with 14 additions and 9 deletions
|
@ -105,7 +105,6 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
(defun +org-init-appearance-h ()
|
||||
"Configures the UI for `org-mode'."
|
||||
(setq org-indirect-buffer-display 'current-window
|
||||
org-eldoc-breadcrumb-separator " → "
|
||||
org-enforce-todo-dependencies t
|
||||
org-entities-user
|
||||
'(("flat" "\\flat" nil "" "" "266D" "♭")
|
||||
|
@ -814,14 +813,6 @@ Unlike showNlevels, this will also unfold parent trees."
|
|||
:weight bold))))
|
||||
(apply fn args)))
|
||||
|
||||
(after! org-eldoc
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or
|
||||
;; 'python' src blocks.
|
||||
;; TODO Should be reported upstream!
|
||||
(puthash "org" #'ignore org-eldoc-local-functions-cache)
|
||||
(puthash "plantuml" #'ignore org-eldoc-local-functions-cache)
|
||||
(puthash "python" #'python-eldoc-function org-eldoc-local-functions-cache))
|
||||
|
||||
(defun +org--restart-mode-h ()
|
||||
"Restart `org-mode', but only once."
|
||||
(quiet! (org-mode-restart))
|
||||
|
@ -1194,6 +1185,20 @@ between the two."
|
|||
(add-hook 'kill-emacs-hook #'org-clock-save))
|
||||
|
||||
|
||||
(use-package! org-eldoc
|
||||
;; HACK: Fix #7633: this hook is no longer autoloaded by org-eldoc (in
|
||||
;; org-contrib), so we have to add it ourselves.
|
||||
:hook (org-mode . org-eldoc-load)
|
||||
:init (setq org-eldoc-breadcrumb-separator " → ")
|
||||
:config
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or 'python'
|
||||
;; src blocks.
|
||||
;; TODO Should be reported upstream!
|
||||
(puthash "org" #'ignore org-eldoc-local-functions-cache)
|
||||
(puthash "plantuml" #'ignore org-eldoc-local-functions-cache)
|
||||
(puthash "python" #'python-eldoc-function org-eldoc-local-functions-cache))
|
||||
|
||||
|
||||
(use-package! org-pdftools
|
||||
:when (modulep! :tools pdf)
|
||||
:commands org-pdftools-export
|
||||
|
|
Loading…
Reference in a new issue