unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7743: unrmail loses extra blank line at end of message
@ 2010-12-27 19:54 Mark Lillibridge
  2011-11-13 19:59 ` bug#7743: bug #7743: unrmail loses extra blank line at end of message [PATCH] Mark Lillibridge
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mark Lillibridge @ 2010-12-27 19:54 UTC (permalink / raw)
  To: 7743


    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")





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-26  6:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-27 19:54 bug#7743: unrmail loses extra blank line at end of message Mark Lillibridge
2011-11-13 19:59 ` bug#7743: bug #7743: unrmail loses extra blank line at end of message [PATCH] Mark Lillibridge
2011-11-16  7:52 ` bug#7743: unrmail loses extra blank line at end of message Glenn Morris
2011-11-19 20:28   ` Mark Lillibridge
2011-11-23  7:50     ` Glenn Morris
     [not found] ` <handler.7743.D7743.132203471715779.notifdone@debbugs.gnu.org>
2011-11-26  6:06   ` bug#7743: closed (Re: bug#7743: unrmail loses extra blank line at end of message) Mark Lillibridge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).