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

Sending a reply always fails with "Text is read-only" #106

Open devrintalen opened 3 years ago

devrintalen commented 3 years ago

Using org-msg with notmuch, getting this message in the minibuffer whenever I attempt to send a reply to an html email:

Text is read-only

Point is always moved back to the #+OPTIONS: ... line. I tried enabling debug on error, but the debugger doesn't get entered so maybe this isn't getting treated as an error?

My org-msg configuration only includes:

(require 'org-msg)
(org-msg-mode)

Here is the contents of the buffer (I've made some edits for privacy):

From: ...
To: ...
Subject: Re: Another signature test
In-Reply-To: <...>
Fcc: ...
--text follows this line--
#+OPTIONS: html-postamble:nil toc:nil author:nil email:nil d:nil
#+STARTUP: 
:PROPERTIES:
:reply-to: nil
:attachment: nil
:alternatives: (html)
:END:
yoyoyoyo

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

testing again 

– 

SIGNATURE
jeremy-compostella commented 3 years ago

I have no idea why you are facing this error and I don't use notmuch so you'll have to do some debug yourself. Some other people uses org-msg with notmuch and I suggest that you contact them if you need assistance.

As a first debug step, I suggest that you start by configuring org-msg with my default configuration. If it resolves the issues, then try to identify which variable made the difference.

(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t"
    org-msg-startup "hidestars indent inlineimages"
    org-msg-greeting-fmt "\nHi *%s*,\n\n"
    org-msg-recipient-names '(("jeremy.compostella@gmail.com" . "Jérémy"))
    org-msg-greeting-name-limit 3
    org-msg-default-alternatives '((new     . (text html))
                       (reply-to-html   . (text html))
                       (reply-to-text   . (text)))
    org-msg-convert-citation t
    org-msg-signature "

 Regards,

 #+begin_signature
 --
 *Jeremy*
 /One Emacs to rule them all/
 #+end_signature")
whudwl commented 3 years ago

@devrintalen you should at least have (setq mail-user-agent 'notmuch-user-agent) in your config.

roederstompers commented 3 years ago

I have the same behavior under mu4e. Not when replying, but when forwarding the mail.

jeremy-compostella commented 3 years ago

@roederstompers, even with the default configuration I suggested ? Even with (setq mail-user-agent 'mu4e-user-agent) ? Also, mail forward is not supported. There is an attempt to at least partially support it on the experimental branch if you want to give it a shot.

roederstompers commented 3 years ago

I will test the experimentalbranch - thank you!

roederstompers commented 3 years ago

@jeremy-compostella - thank's I switch to the experimental branch - forwarding works. I'm new to org-msg - sorry. When I reply to an email with an embedded image, I lose the image after 2 replays. Or when i write a mail like : "Send inline image attachment #41" and i replay to this mail the inline image can't find in the answer.

jeremy-compostella commented 3 years ago

@roederstompers

I don't reproduce this issue. I have been able to reply 8 times without any problem.

It is most likely related to the backend you are using. I suppose that you are using the mu4e backend because both gnus and notmuch use the same engine now. If I am right the function you need to investigate is org-msg-save-article-for-reply-mu4e. Ideally, If you could find a way with mu4e to get access to the original email content, we would be able to leverage what has been done recently in org-msg-save-article-for-reply-notmuch (notmuch backend). And what I mean by original email content is the raw original email content.