forked from mirrors/org-mode
org-latex-preview: Respect auto-generate option
* lisp/org-latex-preview.el (org-latex-preview-auto--detect-fragments-in-change): Respect the user option `org-latex-preview-auto-generate' when `org-latex-preview-auto-mode' is active. (This was lost when the auto-generation code was rewritten.)
This commit is contained in:
parent
5ca232e8ea
commit
1323115972
|
@ -598,6 +598,7 @@ This is intended to be placed in `post-command-hook'."
|
|||
|
||||
(defun org-latex-preview-auto--detect-fragments-in-change (beg end _)
|
||||
"Examine the content between BEG and END, and preview LaTeX fragments found."
|
||||
(when org-latex-preview-auto-generate
|
||||
(let ((initial-point (point))
|
||||
fragments)
|
||||
(save-excursion
|
||||
|
@ -655,7 +656,7 @@ This is intended to be placed in `post-command-hook'."
|
|||
end nil))))
|
||||
(org-latex-preview--create
|
||||
org-latex-preview-default-process
|
||||
fragments))))
|
||||
fragments)))))
|
||||
|
||||
(defun org-latex-preview-auto--maybe-track-element-here (type pos)
|
||||
"Check for an org element of TYPE at `point' and ensure an overlay exists.
|
||||
|
|
Loading…
Reference in New Issue