Subject: bug#9841: closed (Re: bug#9841: 23.3; rmail-edit-current-message adds extra '>'s to Froms...)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 07 Dec 2012 09:05:02 +0000

Your bug report

#9841: 23.3; rmail-edit-current-message adds extra '>'s to Froms...

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
9841: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9841
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#9841: 23.3; rmail-edit-current-message adds extra '>'s to Froms...
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Fri, 07 Dec 2012 04:03:58 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.4

Mark Lillibridge wrote:

> Start with a Rmail message (this one will do) not containing MIME that
> contains lines like the following:

Actually, I can only reproduce this with a message that _is_ MIME, ie
has a "MIME-version: 1.0" header (which almost everything does).
For non-MIME messages, rmail-show-message-1 _does_ add >, which is
why rmail-cease-edit tries to put them back. Anyway, I installed a
change to make it not do that for MIME messages, which have not been
unescaped during display.

Subject: 23.3; rmail-edit-current-message adds extra '>'s to Froms...
From: Mark Lillibridge <[email-masked]>
To: [email-masked]
Date: Sat, 22 Oct 2011 12:05:57 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Start with a Rmail message (this one will do) not containing MIME that
contains lines like the following:

>>From level 1
>>>From level 2
>>>>From level 3

Hit 'e' to edit the message.  Notice that nothing changes.  Now hit ^c^c
or ^c^] to stop editing (the later is supposed to abort, leaving the
message unchanged).  Notice that your message now has one more > in
front of each of the from lines:

>>>From level 1
>>>>From level 2
>>>>>From level 3

You can repeat this as many times as you like, adding more and more >'s.

Towards a patch, I notice that rmail-cease-edit has the following code:

rmailedit.el:135:
  ;; Disguise any "From " lines so they don't start a new message.
  (goto-char (point-min))
  (or rmail-old-pruned (forward-line 1))
  (while (re-search-forward "^>*From " nil t)
    (beginning-of-line)
    (insert ">")
    (forward-line))

There is no corresponding code in the rmail-edit-current-message or the
viewing code that I can find.

    This probably needs more thought, but I think the decode code should
remove one >, and the incorporate new messages and done editting code
should add one > (as above).  Note this is related to bug #6574: Rmail
23 uses a broken mailbox format (mboxo) instead of a sane one like
mboxrd.

    I note that fetchmail to mbox loses information because it only adds
a > to From's without one already.  This is arguably not Rmail's fault,
however.

- Mark