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

Fill-region disabled for plaintext emails #121

Closed hpfr closed 2 years ago

hpfr commented 3 years ago

I'm trying the new support for plaintext emails, and it looks like (cl-letf (((symbol-function #'fill-region) #'ignore)) in org-msg-export-as-text is leaving in long lines in the plaintext export.

What's the intent of this? It's not really commented so I wasn't sure, but I think at least for developer mailing lists that it's desired to fill lines according to org-ascii-text-width. Could this be exposed as an option?

Thanks for your excellent work on this package!

jeremy-compostella commented 3 years ago

The reason for this is when you reply to emails the mailer (in my case gnus) would quote the previous with a leading a leading > which is of course totally expected. However, it does not take into accounts long lines. So lines stays long up to the point of the org exportation which then is going to break line without repeating the leading character.

The following example :

> blablablab alb lab lab lab lbalb lab lab lbalb lab lbalb lab lablab lab lab

would then look like:

> blablablab alb lab lab lab lbalb lab lab lbalb lab lbalb lab lablab
lab lab

instead of the correct:

> blablablab alb lab lab lab lbalb lab lab lbalb lab lbalb lab lablab
> lab lab

For this reason, I thought it was better to just let the user use the fill-paraph (M-q) function as needed.

Regards, Jeremy

PS: git-blame should have led you to 239a28ca.