Fix #2972: infinite recursion in org src blocks

This commit is contained in:
Henrik Lissner 2020-04-27 17:43:29 -04:00
parent 3e67f8f801
commit 82f9dc2566
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -168,12 +168,17 @@ This forces it to read the background before rendering."
("HOLD" . +org-todo-onhold) ("HOLD" . +org-todo-onhold)
("PROJ" . +org-todo-project))) ("PROJ" . +org-todo-project)))
(defadvice! +org-display-link-in-eldoc-a (orig-fn &rest args) (after! org-eldoc
;; HACK Fix #2972: infinite recursion when eldoc kicks in in an 'org' src
;; block.
;; TODO Should be reported upstream!
(puthash "org" "ignore" org-eldoc-local-functions-cache))
(defadvice! +org-display-link-in-eldoc-a (&rest args)
"Display full link in minibuffer when cursor/mouse is over it." "Display full link in minibuffer when cursor/mouse is over it."
:around #'org-eldoc-documentation-function :before-until #'org-eldoc-documentation-function
(or (when-let (link (org-element-property :raw-link (org-element-context))) (when-let (link (org-element-property :raw-link (org-element-context)))
(format "Link: %s" link)) (format "Link: %s" link)))
(apply orig-fn args)))
;; Automatic indent detection in org files is meaningless ;; Automatic indent detection in org files is meaningless
(add-to-list 'doom-detect-indentation-excluded-modes 'org-mode) (add-to-list 'doom-detect-indentation-excluded-modes 'org-mode)