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
278 stars 60 forks source link

Forwarding email with inline image or LaTeX formula fails (reverts to text), but replying works (keeps html) #170

Open prbuen opened 1 year ago

prbuen commented 1 year ago

Org-msg works beautifully for composing emails in org mode including the insertion of math formulae such as $\int_a^b f(x)dx$ which are turned into inline images in the html part ($\int_a^b f(x)dx$).

Replying in html to an email composed in this way works perfectly. The inline image is saved and exported in the html encoded original article. The sent email shows the formula where it should be in the original message.

However, forwarding the same email fails: in org-msg-composition-parameters, org-msg-has-mml-tags returns true (while it returns false when replying). This means .style in org-msg-post-setup is set to nil instead of top-posting and everything reverts to a 'text' forward (which then complains has missing attachments as the image formula is missing). We can still proceed and send, images are attached, but no longer inline (which maybe is ok for images, but isn't great for formulae).

It seems odd to me that an mml tag is found when forwarding but not when replying to the same email? This makes me think it's something that could be fixed so we can forward emails with inline images without messing up how they look (but to be honest I know nothing about mml tags).

A workaround is of course to always 'reply' and edit the To:, Cc: fields, but then the flags are not right.

Forwarding messages that I receive and have attachments sometimes work in html too (unclear to me when). But forwarding messages I write to myself with org-msg, attaching files via C-c C-a, also revert to text during forward, presumably as attachments are detected as mml tags?

I am using mu/mu4e 1.10.4, Emacs 27, Kubuntu 22.04.

Thanks for writing this great package!

prbuen commented 1 year ago

perhaps a duplicate of https://github.com/jeremy-compostella/org-msg/issues/165?