mu icon indicating copy to clipboard operation
mu copied to clipboard

dealing with stray ^M in messages

Open scfrank-pri opened this issue 3 years ago • 10 comments

Unfortunately, there is another problem that prevents me from using mu4e the way it was before switching to the gnus-article view. I now get displayed all messages correctly (thanks to fixing the ^M issue), but when I want to reply the original message is included in base64 encoding (probably because it was base64 in the first place, but it rendered correctly as a text in the view). It should be included as txt in the reply, as it was with the old view. Any advice, what I need to do to get the correct behavior back? Thanks a lot.

scfrank-pri avatar May 16 '22 13:05 scfrank-pri

Please follow the basic rules for reporting things, such as:

  • precisely describe versions and your setup
  • when there's a problem with messages clearly describes if it always happens, sometimes happens, and attach an example message where this occurs
  • can you reproduce with a minimal setup

djcb avatar May 17 '22 04:05 djcb

I.e., without an example message where this happens, we cannot do anything.

djcb avatar May 28 '22 08:05 djcb

Thanks for the reminder and sorry for the late reply - I had switched back to mu4e-view-old to avoid these problems. In the zip file, I attach two emails. If you reply to the one from "editorialmanager", you will see that the text in the reply is encoded in base64 whereas the email looks OK. If you reply to the one from "easychair", you will see that only the header is included in the reply, the text is missing. I assume that this has to do with the ^M, which was fixed with article-remove-cr -- but not for Reply and Forward mail compositions. Thanks a lot for your efforts. problems.zip

scfrank-pri avatar May 28 '22 18:05 scfrank-pri

This is actually a duplicate of https://github.com/djcb/mu/issues/2257 — same cause: ^M ending lines.

Chris00 avatar May 28 '22 18:05 Chris00

For the time being, you should set, say,

(setq mu4e-get-mail-command (expand-file-name "~/bin/mu4e-get-mail.sh"))

where, in addition to fetching your mail, mu4e-get-mail.sh cleans the messages from all terminating ^M (provided this does not break Thunderbird).

Chris00 avatar May 28 '22 18:05 Chris00

The patch https://github.com/djcb/mu/pull/2258 works — but I agree with @djcb that we should understand why gnus-article-remove-cr does not do the job already.

Chris00 avatar May 29 '22 07:05 Chris00

Ah, thanks, that narrows things down.

djcb avatar May 29 '22 08:05 djcb

Thanks for the suggestions. (setq gnus-treat-strip-cr 'head) worked for me, but only for Replies to emails, not for the base64 problem mentioned above. I could not figure out where to find the script mu4e-get-mail.sh, but would be eager to test it.

scfrank-pri avatar May 31 '22 15:05 scfrank-pri

On 31 May 2022 at 08:56 -07, scfrank-pri @.***> wrote:

[…] I could not figure out where to find the script mu4e-get-mail.sh, but would be eager to test it.

You have to create it. I attached an example (it does not do the removal of ^M but does spam detection; you can easily adapt it).

Best, C.

Chris00 avatar May 31 '22 16:05 Chris00

Oh, well, the attachment was removed. Here it is: mu4e-get-mail.sh

Chris00 avatar May 31 '22 16:05 Chris00

I've fixed this in master; we do a article-remove-cr earlier in the rendering and that fixes display for both messages.

djcb avatar Oct 29 '23 15:10 djcb