unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
Subject: Re: Emacs notmuch extracts text attachments as if they had Windows (CRLF) encoding
Date: Thu, 14 Oct 2021 17:35:10 +0200	[thread overview]
Message-ID: <ri6mtnb39ht.fsf@suse.cz> (raw)
In-Reply-To: <m2bl3rlr4m.fsf@guru.guru-group.fi>

Hi,

On Thu, Oct 14 2021, Tomi Ollila wrote:
> On Wed, Oct 13 2021, Martin Jambor wrote:
>
>> Hi,
>>
>> I have stumbled upon strange behavior of emacs-notmuch.  When I extract
>> (some?) plain text attachments into files using notmuch-show-save-part
>> (by pressing ".s"), the file they end up in has Windows encoding of line
>> ends (CRLF) even though both the machine used to send and receive the
>> email are Linux ones.
>>
>> I can reproduce the issue with the attached example email.  Emacs
>> notmuch extracts the attachment into a windows encoding file while mutt
>> or metamail does not.
>>
>> Can anyone else reproduce this behavior?  Any ideas how to fix it?
>
> Are you talking about this attachment in the gzipped email content:
>
>   ---1609908220-525021627-1633684545=:5930
>   Content-Type: text/plain; charset=US-ASCII; name=status
>   Content-Transfer-Encoding: BASE64
>   Content-Description: test
>   Content-Disposition: attachment; filename=status
>
>   U3RhdHVzDQo9PT09PT0NCg0KVGhlIEdDQyBkZXZlbG9wbWVudCBicmFuY2gg
>   ...
>   NTgzMS5odG1sDQo=
>
>   ---1609908220-525021627-1633684545=:5930--
>
> I manually extracted the BASE64 content, it does have the 
> CRLF line endings...
>

Thanks for looking into it.  I guess that explains it then.  Apparently
the behavior of mutt (and possibly other email clients) is to convert
the format to the local one. I did not expect metamail to do that,
though.

Thanks again,

Martin

      reply	other threads:[~2021-10-14 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 13:54 Emacs notmuch extracts text attachments as if they had Windows (CRLF) encoding Martin Jambor
2021-10-14 12:36 ` Tomi Ollila
2021-10-14 15:35   ` Martin Jambor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ri6mtnb39ht.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).