GNU bug report logs -
#7743
unrmail loses extra blank line at end of message
Previous Next
Reported by: mark.lillibridge <at> hp.com
Date: Mon, 27 Dec 2010 19:48:02 UTC
Severity: minor
Tags: patch
Fixed in version 24.0.92
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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")
This bug report was last modified 13 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.