GNU bug report logs - #79370
[PATCH] Do not quote "^From " when fetching from IMAP

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Tue, 2 Sep 2025 15:27:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 79370 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org:
bug#79370; Package emacs. (Tue, 02 Sep 2025 15:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manuel Giraud <manuel <at> ledu-giraud.fr>:
New bug report received and forwarded. Copy sent to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org. (Tue, 02 Sep 2025 15:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Do not quote "^From " when fetching from IMAP
Date: Tue, 02 Sep 2025 17:26:11 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

Hi,

I'm using mail-source in Gnus to fetch mail from IMAP.  Whenever I get a
message with a line that start with "From " this line is quoted.

This patch removes this quirk… but maybe it was there for a reason.  We
don't have the history for this modification since it is present in the
code of "mail-source.el" since its import into Emacs (in 2000).  FWIW,
'mail-source-fetch-maildir' have this part commented since 2000 also.



In GNU Emacs 31.0.50 (build 31, x86_64-unknown-openbsd7.7) of 2025-09-01
 built on computer
Repository revision: b52ccb997d598caa321141c0abb553d3b3803eee
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101018
System Description: OpenBSD computer 7.7 GENERIC.MP#10 amd64

Configured using:
 'configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
 MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
 --bindir=/home/manuel/bin --with-x-toolkit=no
 --with-toolkit-scroll-bars=no --without-cairo --without-dbus
 --without-gconf --without-gsettings --without-compress-install'

[0001-Do-not-quote-From-when-fetching-from-IMAP.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Manuel Giraud

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79370; Package emacs. (Tue, 02 Sep 2025 15:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 79370 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 79370 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#79370: [PATCH] Do not quote "^From " when fetching from IMAP
Date: Tue, 02 Sep 2025 17:33:49 +0200
>>>>> On Tue, 02 Sep 2025 17:26:11 +0200, Manuel Giraud <manuel <at> ledu-giraud.fr> said:

    Manuel> Tags: patch
    Manuel> Hi,

    Manuel> I'm using mail-source in Gnus to fetch mail from IMAP.  Whenever I get a
    Manuel> message with a line that start with "From " this line is quoted.

    Manuel> This patch removes this quirk… but maybe it was there for a reason.  We
    Manuel> don't have the history for this modification since it is present in the
    Manuel> code of "mail-source.el" since its import into Emacs (in 2000).  FWIW,
    Manuel> 'mail-source-fetch-maildir' have this part commented since 2000 also.

mbox uses "From" at the start of a line as a separator between
messages. If youʼre certain that the destination is not an mbox file,
then not prepending '>' is ok.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79370; Package emacs. (Tue, 02 Sep 2025 16:16:01 GMT) Full text and rfc822 format available.

Message #11 received at 79370 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 79370 <at> debbugs.gnu.org, larsi <at> gnus.org, manuel <at> ledu-giraud.fr
Subject: Re: bug#79370: [PATCH] Do not quote "^From " when fetching from IMAP
Date: Tue, 02 Sep 2025 19:15:14 +0300
> Cc: 79370 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Tue, 02 Sep 2025 17:33:49 +0200
> 
> >>>>> On Tue, 02 Sep 2025 17:26:11 +0200, Manuel Giraud <manuel <at> ledu-giraud.fr> said:
> 
>     Manuel> Tags: patch
>     Manuel> Hi,
> 
>     Manuel> I'm using mail-source in Gnus to fetch mail from IMAP.  Whenever I get a
>     Manuel> message with a line that start with "From " this line is quoted.
> 
>     Manuel> This patch removes this quirk… but maybe it was there for a reason.  We
>     Manuel> don't have the history for this modification since it is present in the
>     Manuel> code of "mail-source.el" since its import into Emacs (in 2000).  FWIW,
>     Manuel> 'mail-source-fetch-maildir' have this part commented since 2000 also.
> 
> mbox uses "From" at the start of a line as a separator between
> messages.

Right, so this quoting is a must to keep the result in a valid mbox
format.  We have this quoting in several other places in Emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79370; Package emacs. (Tue, 02 Sep 2025 17:25:01 GMT) Full text and rfc822 format available.

Message #14 received at 79370 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 79370 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#79370: [PATCH] Do not quote "^From " when fetching from IMAP
Date: Tue, 02 Sep 2025 19:24:11 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Tue, 02 Sep 2025 17:26:11 +0200, Manuel Giraud <manuel <at> ledu-giraud.fr> said:
>
>     Manuel> Tags: patch
>     Manuel> Hi,
>
>     Manuel> I'm using mail-source in Gnus to fetch mail from IMAP.  Whenever I get a
>     Manuel> message with a line that start with "From " this line is quoted.
>
>     Manuel> This patch removes this quirk… but maybe it was there for a reason.  We
>     Manuel> don't have the history for this modification since it is present in the
>     Manuel> code of "mail-source.el" since its import into Emacs (in 2000).  FWIW,
>     Manuel> 'mail-source-fetch-maildir' have this part commented since 2000 also.
>
> mbox uses "From" at the start of a line as a separator between
> messages. If youʼre certain that the destination is not an mbox file,
> then not prepending '>' is ok.

Ok so we'd have to add a test on the storage backend (I use nnml
myself).  Then maybe it is safer to keep this is as is for a relatively
minor annoyance.
-- 
Manuel Giraud




This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.