forked from mirrors/org-mode
org-latex-preview: Still show errs with no tooltip
* lisp/org-latex-preview.el (org-latex-preview--update-overlay): When `tooltip-mode' is not active, still show the error, just remove multiple spaces to be economic with the horizontal room available. This isn't good as showing the tooltip, but it's better than not showing anything.
This commit is contained in:
parent
90e7813dd7
commit
557275af54
|
@ -499,8 +499,13 @@ overlay face is set to `org-latex-preview-processing-face'."
|
||||||
(unless (overlay-get ov 'view-text) ;Live previewing this element, update in background
|
(unless (overlay-get ov 'view-text) ;Live previewing this element, update in background
|
||||||
;; This is a temporary measure until a more sophisticated
|
;; This is a temporary measure until a more sophisticated
|
||||||
;; interface for errors is available in Org.
|
;; interface for errors is available in Org.
|
||||||
(when (and errors tooltip-mode)
|
(when errors
|
||||||
(overlay-put ov 'help-echo errors))
|
(overlay-put
|
||||||
|
ov 'help-echo
|
||||||
|
(if (bound-and-true-p tooltip-mode)
|
||||||
|
errors
|
||||||
|
(concat (propertize "! " 'face '(bold error))
|
||||||
|
(substring (replace-regexp-in-string "[\n\r\t ]+" " " errors) 2)))))
|
||||||
(when image-display (overlay-put ov 'display image-display))
|
(when image-display (overlay-put ov 'display image-display))
|
||||||
(overlay-put ov 'face (overlay-get ov 'hidden-face)))
|
(overlay-put ov 'face (overlay-get ov 'hidden-face)))
|
||||||
(run-hook-with-args 'org-latex-preview-update-overlay-functions ov)))
|
(run-hook-with-args 'org-latex-preview-update-overlay-functions ov)))
|
||||||
|
|
Loading…
Reference in New Issue