Fix #4460: simplify +org--strip-properties-from-outline-a
Link cleanup is done upstream, in org, so we don't have to.
This commit is contained in:
parent
c12eb117e9
commit
12d8691fa8
1 changed files with 7 additions and 13 deletions
|
@ -550,20 +550,14 @@ the exported output (i.e. formatters)."
|
|||
(when (get-buffer-window)
|
||||
(recenter)))
|
||||
|
||||
(defadvice! +org--strip-properties-from-outline-a (orig-fn path &optional width prefix separator)
|
||||
"Remove link syntax and fix variable height text (e.g. org headings) in the
|
||||
eldoc string."
|
||||
(defadvice! +org--strip-properties-from-outline-a (orig-fn &rest args)
|
||||
"Fix variable height faces in eldoc breadcrumbs."
|
||||
:around #'org-format-outline-path
|
||||
(funcall orig-fn
|
||||
(cl-loop for part in path
|
||||
;; Remove full link syntax
|
||||
for fixedpart = (replace-regexp-in-string org-link-any-re "\\4" (or part ""))
|
||||
for n from 0
|
||||
for face = (nth (% n org-n-level-faces) org-level-faces)
|
||||
collect
|
||||
(org-add-props fixedpart
|
||||
nil 'face `(:foreground ,(face-foreground face nil t) :weight bold)))
|
||||
width prefix separator))
|
||||
(let ((org-level-faces
|
||||
(cl-loop for face in org-level-faces
|
||||
collect `(:foreground ,(face-foreground face nil t)
|
||||
:weight bold))))
|
||||
(apply orig-fn args)))
|
||||
|
||||
(after! org-eldoc
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue