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
275 stars 58 forks source link

org-msg-edit-mode not set when replying to text emails (mu4e) #89

Closed guibor closed 3 years ago

guibor commented 3 years ago

In org-msg-post-setup we call org-msg-edit-mode only if the message is either new or the field body-html exists in mu4e-compose-parent-message.

Although we may want to default to text reply when the original email is text (and this is now possible using org-msg-alternatives) behavior should be consistent and we should still be able to reply using org-msg (and all the great functionality that comes with it!).

jeremy-compostella commented 3 years ago

Hi @guibor,

I made an experimental patch which implement this feature request. Could you give a try?

Regards, Jeremy

morganwillcock commented 3 years ago

The export process through Org is damaging to a signature delimiter, which will likely cause a problem when the recipient of the message goes to reply.

i.e. -- \n is being stripped to --\n

The problem is visible with org-msg-preview.

jeremy-compostella commented 3 years ago

Good catch! The additional 2f29f7a patch should address this. Let me know what you think.

morganwillcock commented 3 years ago

On Emacs 27 flet doesn't seem to be defined.

let: Symbol’s function definition is void: flet
jeremy-compostella commented 3 years ago

Indeed, this is an obsolete macro. I re-wrote this using the cl-letf macro. Could you verify that the experimental branch work for you ?

morganwillcock commented 3 years ago

It has fixed stripping the whitespace from the end of the line.

When testing further there is also an issue that the signature may be indented if the Org markup has opened a block (e.g. a heading was defined). This isn't immediately obvious when composing/sending because the signature that is inserted automatically is left-aligned. This will also cause an issue with matching the signature as it is common to use the regex pattern "^-- " which will no longer match because of leading whitespace of the indent (see message-signature-separator)

jeremy-compostella commented 3 years ago

The latest version should take care of this.

morganwillcock commented 3 years ago

Thanks, this version does fix it.

jeremy-compostella commented 3 years ago

alright, then let's close this ticket.

guibor commented 3 years ago

Thanks, I actually just had a chance to check this out today and it works great!