From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 27 14:47:34 2010 Received: (at submit) by debbugs.gnu.org; 27 Dec 2010 19:47:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PXJ2c-0000TL-KK for submit@debbugs.gnu.org; Mon, 27 Dec 2010 14:47:34 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PXJ2Z-0000T9-Ui for submit@debbugs.gnu.org; Mon, 27 Dec 2010 14:47:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXJ99-0007BY-HE for submit@debbugs.gnu.org; Mon, 27 Dec 2010 14:54:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:47896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXJ99-0007BU-FH for submit@debbugs.gnu.org; Mon, 27 Dec 2010 14:54:19 -0500 Received: from [140.186.70.92] (port=52994 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXJ98-0002NW-GI for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2010 14:54:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXJ97-0007B9-Hv for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2010 14:54:18 -0500 Received: from gundega.hpl.hp.com ([192.6.19.190]:39732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXJ97-0007B2-63 for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2010 14:54:17 -0500 Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25]) by gundega.hpl.hp.com (8.14.3/8.14.3/HPL-PA Relay) with ESMTP id oBRJsCSv029421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Dec 2010 11:54:12 -0800 Received: from ts-rhel5 (ts-rhel5.hpl.hp.com [15.25.118.27]) by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id oBRJsAHV001888; Mon, 27 Dec 2010 11:54:11 -0800 Date: Mon, 27 Dec 2010 11:54:10 -0800 Message-Id: From: Mark Lillibridge To: bug-gnu-emacs@gnu.org Subject: unrmail loses extra blank line at end of message X-Scanned-By: MIMEDefang 2.69 on 15.0.48.190 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: mark.lillibridge@hp.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) 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") From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 13 15:00:39 2011 Received: (at 7743) by debbugs.gnu.org; 13 Nov 2011 20:00:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPgEF-0000To-61 for submit@debbugs.gnu.org; Sun, 13 Nov 2011 15:00:38 -0500 Received: from gundega.hpl.hp.com ([192.6.19.190]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPgEC-0000Tf-Hp for 7743@debbugs.gnu.org; Sun, 13 Nov 2011 15:00:33 -0500 Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25]) by gundega.hpl.hp.com (8.14.4/8.14.4/HPL-PA Relay) with ESMTP id pADK00F0014658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <7743@debbugs.gnu.org>; Sun, 13 Nov 2011 12:00:00 -0800 Received: from ts-rhel5 (ts-rhel5.hpl.hp.com [15.25.118.27]) by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id pADJxwmd013642; Sun, 13 Nov 2011 11:59:58 -0800 Date: Sun, 13 Nov 2011 11:59:58 -0800 Message-Id: From: Mark Lillibridge To: 7743@debbugs.gnu.org Subject: bug #7743: unrmail loses extra blank line at end of message [PATCH] X-Scanned-By: MIMEDefang 2.71 on 15.0.48.190 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 7743 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: mark.lillibridge@hp.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) The automatic system seems not to have noticed, but I provided a patch for this bug: ts-rhel5 [124]% ( setenv LC_ALL C ; setenv TZ UTC0 ; diff -Naur original-unrmail.el unrmail.el) --- original-unrmail.el 2011-11-13 19:57:25.156549000 +0000 +++ unrmail.el 2011-11-13 19:58:34.826505000 +0000 @@ -232,10 +232,9 @@ (while (search-forward "\nFrom " nil t) (forward-char -5) (insert ?>))) - ;; Make sure the message ends with two newlines + ;; Add terminator blank line to message (goto-char (point-max)) - (unless (looking-back "\n\n") - (insert "\n")) + (insert "\n") ;; Write it to the output file, suitably encoded. (let ((coding-system-for-write coding)) (write-region (point-min) (point-max) to-file t From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 02:53:42 2011 Received: (at 7743) by debbugs.gnu.org; 16 Nov 2011 07:53:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQaJR-0001WC-Vo for submit@debbugs.gnu.org; Wed, 16 Nov 2011 02:53:42 -0500 Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQaJP-0001W5-H9 for 7743@debbugs.gnu.org; Wed, 16 Nov 2011 02:53:40 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RQaIf-0006lY-Oh; Wed, 16 Nov 2011 02:52:53 -0500 From: Glenn Morris To: mark.lillibridge@hp.com Subject: Re: bug#7743: unrmail loses extra blank line at end of message References: X-Spook: government Waco, Texas terrorist Crypto AG David John X-Ran: mr__a'"Q=|V_n.L-tB>4cIRBLv7*cfrIt=m2k6U/w%]5EQo"fwo'ezs>1zP1-0\aOwd{;e X-Hue: yellow X-Attribution: GM Date: Wed, 16 Nov 2011 02:52:53 -0500 In-Reply-To: (Mark Lillibridge's message of "Mon, 27 Dec 2010 11:54:10 -0800") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7743 Cc: 7743@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Mark Lillibridge wrote: > 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. This sounds very believable, but I am having a hard time convinving myself. I used the system `mail' command to send myself a few mails ending in blank lines. I used Emacs 22.3 to convert the resulting mail spool file to Babyl, then the current trunk's unrmail to convert that Babyl back to mbox. The mbox I got back was identical to the original mail spool (modulo the addition of X-RMAIL-ATTRIBUTES and X-Coding-System) headers. 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?). From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 19 15:29:12 2011 Received: (at 7743) by debbugs.gnu.org; 19 Nov 2011 20:29:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRrXD-0001tl-Qz for submit@debbugs.gnu.org; Sat, 19 Nov 2011 15:29:11 -0500 Received: from madara.hpl.hp.com ([192.6.19.124]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRrXB-0001tc-8y for 7743@debbugs.gnu.org; Sat, 19 Nov 2011 15:29:10 -0500 Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25]) by madara.hpl.hp.com (8.14.4/8.14.4/HPL-PA Relay) with ESMTP id pAJKS388025873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 19 Nov 2011 12:28:03 -0800 Received: from ts-rhel5 (ts-rhel5.hpl.hp.com [15.25.118.27]) by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id pAJKS0e7000482; Sat, 19 Nov 2011 12:28:00 -0800 Date: Sat, 19 Nov 2011 12:28:00 -0800 Message-Id: From: Mark Lillibridge To: Glenn Morris In-reply-to: (message from Glenn Morris on Wed, 16 Nov 2011 02:52:53 -0500) Subject: Re: bug#7743: unrmail loses extra blank line at end of message References: X-Scanned-By: MIMEDefang 2.71 on 15.0.152.124 X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 7743 Cc: 7743@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: mark.lillibridge@hp.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) Glenn wrote: > Mark Lillibridge wrote: > > > 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. > > This sounds very believable, but I am having a hard time convinving > myself. > > I used the system `mail' command to send myself a few mails ending in > blank lines. I used Emacs 22.3 to convert the resulting mail spool file > to Babyl, then the current trunk's unrmail to convert that Babyl back to > mbox. The mbox I got back was identical to the original mail spool > (modulo the addition of X-RMAIL-ATTRIBUTES and X-Coding-System) headers. > > 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. I haven't reported all the Rmail 22 bugs I've found because they are moot at this point. - Mark PS, I will send you (Glenn) my relevant test files in case you didn't keep yours. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 02:51:57 2011 Received: (at 7743-done) by debbugs.gnu.org; 23 Nov 2011 07:51:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RT7cb-00046Q-9e for submit@debbugs.gnu.org; Wed, 23 Nov 2011 02:51:57 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RT7cZ-00046K-NV for 7743-done@debbugs.gnu.org; Wed, 23 Nov 2011 02:51:56 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RT7bB-0004Ak-52; Wed, 23 Nov 2011 02:50:29 -0500 From: Glenn Morris To: 7743-done@debbugs.gnu.org Subject: Re: bug#7743: unrmail loses extra blank line at end of message References: X-Spook: encryption subversive government STARLAN arrangements X-Ran: qfq/4DXn7PU"o! (Mark Lillibridge's message of "Sat, 19 Nov 2011 12:28:00 -0800") Message-ID: <8dobw38egq.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7743-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 01:07:53 2011 Received: (at 7743) by debbugs.gnu.org; 26 Nov 2011 06:07:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RUBQX-0007IK-NL for submit@debbugs.gnu.org; Sat, 26 Nov 2011 01:07:53 -0500 Received: from gundega.hpl.hp.com ([192.6.19.190]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RUBQV-0007IC-9A for 7743@debbugs.gnu.org; Sat, 26 Nov 2011 01:07:52 -0500 Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25]) by gundega.hpl.hp.com (8.14.4/8.14.4/HPL-PA Relay) with ESMTP id pAQ668TI022711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 Nov 2011 22:06:08 -0800 Received: from ts-rhel5.hpl.hp.com (ts-rhel5.hpl.hp.com [15.25.118.27]) by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id pAQ666Ed009147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 Nov 2011 22:06:06 -0800 Received: from ts-rhel5.hpl.hp.com (localhost.localdomain [127.0.0.1]) by ts-rhel5.hpl.hp.com (8.13.8/8.13.8) with ESMTP id pAQ666jq018043; Fri, 25 Nov 2011 22:06:06 -0800 Received: (from mdl@localhost) by ts-rhel5.hpl.hp.com (8.13.8/8.13.8/Submit) id pAQ665fK018042; Fri, 25 Nov 2011 22:06:05 -0800 X-Authentication-Warning: ts-rhel5.hpl.hp.com: mdl set sender to mark.lillibridge@hp.com using -f To: <7743@debbugs.gnu.org> Subject: Re: bug#7743: closed (Re: bug#7743: unrmail loses extra blank line at end of message) In-Reply-To: (message from GNU bug Tracking System on Wed, 23 Nov 2011 07:52:02 +0000) References: <8dobw38egq.fsf@fencepost.gnu.org> From: Mark Lillibridge Date: Fri, 25 Nov 2011 22:06:05 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.71 on 15.0.48.190 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 7743 Cc: rgm@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: mark.lillibridge@hp.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Glenn Morris writes: > 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. The adding an extra line on incorporation is a recent bug; my older BABYL files don't have the extra blank lines. - Mark From unknown Thu Aug 14 21:54:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 24 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator