jeremy-compostella / org-msg

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
GNU General Public License v3.0
276 stars 57 forks source link

Email with Latex Equation in org-msg (mu4e) does not convert and send #132

Open TS-CUBED opened 2 years ago

TS-CUBED commented 2 years ago

What did you expect to happen?

Using mu4e with org-msg, I include a LaTeX equation in the email body and expect it to be included as a png image. What actually happened?

When attempting to send the message (C-c C-c), the message is not sent if it includes a LaTeX eqyuation (tex:dvipng)

Error (message-send-hook): Error running hook "org-msg-prepare-to-send" because: (void-variable source)

or:

condition-case: Error in a Doom startup hook: message-send-hook, org-msg-prepare-to-send, (void-variable source)

Describe your attempts to resolve the issue

Email does get sent with

images attached, or created using babel source blocks (e.g. Python or Julia blocks)
other rich text formatting using org-mode (headers, tables, lists, etc.)

only LaTeX equations trigger the error above.

Using tex:dvisvgm works, and attaches the LaTeX equation, but email clients don't handle svg files well. Steps to reproduce

Open Emacs
Start Mu4E
"C" to compose message, enter recipient
In message body, enter equation: $\sin(\alpha)$
"C-c C-c"
error message:
Error (message-send-hook): Error running hook "org-msg-prepare-to-send" because: (void-variable source)

System Information

https://pastebin.com/tPcqXb2Y

danielfleischer commented 2 years ago

I'm using the option tex:imagemagick successfully. Can you try that?

TS-CUBED commented 2 years ago

Thanks Daniel,

that seems to work.

Although I'd rather not use imagemagick, TBH.

There is a bug in imagemagick, and you have to explicitely allow the pdf translation (which has been disabled because of that bug), thus reducing the security on the system.

jsilve24 commented 2 years ago

FWIW I am also having this issue. Same exact behavior. Imagemagick works but I have a similar concern.