From 090c7b9afa089bb57856857529a8cc8495b87d93 Mon Sep 17 00:00:00 2001 From: TEC Date: Sat, 2 Oct 2021 16:01:34 +0800 Subject: [PATCH] fix(mu4e): minor errors with org-msg LaTeX eqns A typo and a missing "*" break the creation and insertion of LaTeX images. Close #5416 --- modules/email/mu4e/autoload/advice.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/email/mu4e/autoload/advice.el b/modules/email/mu4e/autoload/advice.el index 28a581a8c..71f71750e 100644 --- a/modules/email/mu4e/autoload/advice.el +++ b/modules/email/mu4e/autoload/advice.el @@ -39,9 +39,9 @@ clicked." "For a given IMG-URI, use imagemagick to find its width." (if +org-msg-currently-exporting (when (and (not IS-WINDOWS)) ; relies on posix path - (let ((with-call (and (executable-find "identify") - (doom-call-process "identify" "-format" "%w" - (substring img-uri 7))))) ; 7=(length "file://") + (let ((width-call (and (executable-find "identify") + (doom-call-process "identify" "-format" "%w" + (substring img-uri 7))))) ; 7=(length "file://") (unless width-call (setq width-call (doom-call-process "file" (substring img-uri 7))) (setcdr width-call (replace-regexp-in-string "^.*image data, \\([0-9]+\\).*$" "\\1" (cdr width-call))) @@ -74,14 +74,14 @@ account for the value of :scale in `org-format-latex-options'." (let ((formula-link (org-html-format-latex latex-frag processing-type info))) (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) - (let ((source (org-export-file-uri (match-string 1 formula-link))) - (attributes (append (list :alt latex-frag - :class - (concat "latex-fragment-" - (if (equal "\\(" (substring latex-frag 0 2)) - "inline" "block"))) - (when (memq processing-type '(dvipng convert)) - (+org-msg-img-scale-css source))))) + (let* ((source (org-export-file-uri (match-string 1 formula-link))) + (attributes (append (list :alt latex-frag + :class + (concat "latex-fragment-" + (if (equal "\\(" (substring latex-frag 0 2)) + "inline" "block"))) + (when (memq processing-type '(dvipng convert)) + (+org-msg-img-scale-css source))))) (org-html--format-image source attributes info))))) (t latex-frag))))