diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index bb076d934..9b87845a3 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -256,6 +256,7 @@ clicked." (format "%.1fpx" (/ (string-to-number (shell-command-to-string + ;; TODO change to use 'file' (format "identify -format %%w %s" (substring img-uri 7)))) ; 7=(length "file://") (plist-get org-format-latex-options :scale)))) @@ -286,7 +287,9 @@ account for the value of :scale in `org-format-latex-options'." :class (concat "latex-fragment-" (if (equal "\\(" (substring latex-frag 0 2)) "inline" "block"))))) - (when (and (memq processing-type '(dvipng convert)) IS-LINUX) + (when (and (memq processing-type '(dvipng convert)) + (not IS-WINDOWS) ; relies on posix path + (executable-find "identify")) (apply #'plist-put attributes (+org-msg-img-scale-css source))) (org-html--format-image source attributes info))))) (t latex-frag)))) @@ -327,7 +330,9 @@ scales the image to account for the value of :scale in `org-format-latex-options processing-type info))) (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) (let ((source (org-export-file-uri (match-string 1 formula-link)))) - (when (and (memq processing-type '(dvipng convert)) IS-LINUX) + (when (and (memq processing-type '(dvipng convert)) + (not IS-WINDOWS) ; relies on posix path + (executable-find "identify")) (apply #'plist-put attributes (+org-msg-img-scale-css source))) (org-html--wrap-latex-environment (org-html--format-image source attributes info) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 7e60705d5..2e3cb5123 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -171,7 +171,7 @@ (advice-add #'mu4e~main-action-str :override #'mu4e~main-action-prettier-str)) (use-package! org-msg - :after (mu4e org) + :after mu4e :when (featurep! :lang org) :config (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t tex:dvipng"