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
d6db0312fd
commit
52355c6131
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 ()
|
(defun +org-init-appearance-h ()
|
||||||
"Configures the UI for `org-mode'."
|
"Configures the UI for `org-mode'."
|
||||||
(setq org-indirect-buffer-display 'current-window
|
(setq org-indirect-buffer-display 'current-window
|
||||||
org-eldoc-breadcrumb-separator " → "
|
|
||||||
org-enforce-todo-dependencies t
|
org-enforce-todo-dependencies t
|
||||||
org-entities-user
|
org-entities-user
|
||||||
'(("flat" "\\flat" nil "" "" "266D" "♭")
|
'(("flat" "\\flat" nil "" "" "266D" "♭")
|
||||||
|
@ -814,14 +813,6 @@ Unlike showNlevels, this will also unfold parent trees."
|
||||||
:weight bold))))
|
:weight bold))))
|
||||||
(apply fn args)))
|
(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 ()
|
(defun +org--restart-mode-h ()
|
||||||
"Restart `org-mode', but only once."
|
"Restart `org-mode', but only once."
|
||||||
(quiet! (org-mode-restart))
|
(quiet! (org-mode-restart))
|
||||||
|
@ -1194,6 +1185,20 @@ between the two."
|
||||||
(add-hook 'kill-emacs-hook #'org-clock-save))
|
(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
|
(use-package! org-pdftools
|
||||||
:when (modulep! :tools pdf)
|
:when (modulep! :tools pdf)
|
||||||
:commands org-pdftools-export
|
:commands org-pdftools-export
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue