[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org b338a90698 3/4: org-create-math-formula: Do not run
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org b338a90698 3/4: org-create-math-formula: Do not run file-related hooks when checking output |
Date: |
Tue, 19 Mar 2024 12:59:00 -0400 (EDT) |
branch: externals/org
commit b338a906982eb53b390a436d2fb2a5f53288a454
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-create-math-formula: Do not run file-related hooks when checking output
* lisp/org.el (org-create-math-formula): Avoid using
`find-file-noselect' to check contents of the generated mathml
formula. `find-file-noselect' runs a number of hooks, which are not
necessary and may sometimes throw errors.
Link: https://orgmode.org/list/ut96a7$i6d$1@ciao.gmane.io
---
lisp/org.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 0ca0d2f7db..81635366c5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16225,7 +16225,8 @@ inspection."
(setq shell-command-output (shell-command-to-string cmd))
(setq mathml
(when (file-readable-p tmp-out-file)
- (with-current-buffer (find-file-noselect tmp-out-file t)
+ (with-temp-buffer
+ (insert-file-contents tmp-out-file)
(goto-char (point-min))
(when (re-search-forward
(format "<math[^>]*?%s[^>]*?>\\(.\\|\n\\)*</math>"