emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#7743: closed (unrmail loses extra blank line at en


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#7743: closed (unrmail loses extra blank line at end of message)
Date: Wed, 23 Nov 2011 07:52:01 +0000

Your message dated Wed, 23 Nov 2011 02:50:29 -0500
with message-id <address@hidden>
and subject line Re: bug#7743: unrmail loses extra blank line at end of message
has caused the debbugs.gnu.org bug report #7743,
regarding unrmail loses extra blank line at end of message
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7743: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7743
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: unrmail loses extra blank line at end of message Date: Mon, 27 Dec 2010 11:54:10 -0800
    As of at least Emacs 23.1 and still present in version 24, unrmail
throws away the last blank line of a message if present.  The offending
code is in unrmail.el:

unrmail.el:235:
            ;; Make sure the message ends with two newlines
            (goto-char (point-max))
            (unless (looking-back "\n\n")
              (insert "\n"))

This is wrong!  Mbox format ends every message with a blank line, which
is not part of the message, so this code by failing to add the necessary
terminator blank line to messages that already end with a blank line
effectively removes the last blank line of such messages.


    The fix is easy: just always add the blank line like so:

unrmail.el:235:
            ;; Add terminator blank line to message
            (goto-char (point-max))
            (insert "\n")


- Mark
PS, the patch for this change hopefully is:

ts-rhel5 [106]% diff original-unrmail.el new-unrmail.el
235c235
<           ;; Make sure the message ends with two newlines
---
>           ;; Add terminator blank line to message
237,238c237
<           (unless (looking-back "\n\n")
<             (insert "\n"))
---
>           (insert "\n")



--- End Message ---
--- Begin Message --- Subject: Re: bug#7743: unrmail loses extra blank line at end of message Date: Wed, 23 Nov 2011 02:50:29 -0500 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.0.92

Mark Lillibridge wrote:

>>  So I cannot see that blank lines are going missing (unless going from
>>  Babyl to mbox adds one, and going the other way subtracts one?).
>
>     You got it!  Examine the BABYL file and you will see that Rmail 22.3
> has added an extra blank line after each of your messages.  That was a
> recent (pre transformation to 23) RMAIL bug, I believe.  My older email
> does not have these extra blank lines. 

It sort of makes me wonder if it is worth changing this now, because if
most BABYL files started life as mbox files but were converted by Emacs,
then they have an extra blank line.

But anyway, I installed this.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]