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
280 stars 61 forks source link

Forwarded mail citation only includes html #120

Open rjhwelsh opened 3 years ago

rjhwelsh commented 3 years ago

I noticed by forwarding email to myself (and some friends), I only receive the html version of the quoted email below the citation line. The text version does not include the cited email below the citation line.

This is possibly related to Issue #73

I am using doom-emacs with org-msg (version 2.9) on mu4e.

rjhwelsh commented 3 years ago

Okay, I just upgraded and tested with org-msg (version 3.8) on mu4e. Same results.

jeremy-compostella commented 3 years ago

Hi,

This is expected. I you read carefully the README.org you'll see that

OrgMsg composes reply to HTML emails in top-posting style. This behavior can be disabled by setting org-msg-posting-style to any value other than top-posting.

The top-posting style only applies to the HTML part.

Regards, Jeremy

rjhwelsh commented 3 years ago

Hi,

Thank you for responding. The issue is not with the posting style. It is that the text part of the email does not include any of the text below the citation line.

Citation line:

--citation follows this line (read-only)--

So for example if I Forward or Reply to an email:

Hi, This is my response. --citation follows this line (read-only)--

Hi, This is the first email.

The email is sent in two parts like this... Html:

Hi, This is my response. --citation follows this line (read-only)--

Hi, This is the first email.

Text:

Hi, This is my response.

You may note that the text part of the email does not include any of the citation. Is this desired behaviour? Is there a place to workaround this?

jeremy-compostella commented 3 years ago

The text below the citation line is not intended to be sent in text form. It is present in the composition buffer for reference.

rjhwelsh commented 3 years ago

Okay, thanks for all your work on this project I appreciate it. The org-mode to html capability is :man_cook: (chef's kiss).

PR to provide an option to include citation text in text/plain

Would you be open to a PR to the org-msg-export-as-text function; in order to add some options to include the text below the citation line for text/plain formats?

To add the option to include the citation in text/plain formats, I am thinking about:

  1. Specifying an org-msg-options value like #+OPTIONS: include-plain-citation:nil
  2. Creating a variable like org-msg-text-posting-style or org-msg-text-include-citation

1. would mean that a plain citation could be included depending on the situation, but otherwise would defer to the default behaviour. 2. would be to change the behaviour to always include the citation in text/plain. I would probably do them as two separate PRs tbh.

Are there any other caveats around this issue that I may be missing?

My usecase / experience

(For reference)

prbuen commented 1 year ago

It would be useful if the text part of a composite text+html email could be retained when replying/forwarding (no idea how hard this would be, though).

In addition to preventing users to see an empty email if they set up their mail user agent to prefer text to html (e.g. in Thunderbird), another use case is to retain the source code for embedded Latex formulae. When composing an org email with an embedded LaTeX formula, e.g. ($\int_a^b f(x) dx$), the html shows the image of the formula ($\int_a^b f(x) dx$), and the text part retains the $...$ code, which is useful for copying + editing.