From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: documentation of Rmail 23 mailbox format? Date: Sun, 06 Nov 2011 14:43:43 +0800 Message-ID: <87mxc9oin4.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1320561842 6205 80.91.229.12 (6 Nov 2011 06:44:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2011 06:44:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: mark.lillibridge@hp.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 06 07:43:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RMwSU-0003ui-ES for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2011 07:43:58 +0100 Original-Received: from localhost ([::1]:36180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMwST-0001bM-S6 for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2011 01:43:57 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMwSQ-0001b6-Ex for emacs-devel@gnu.org; Sun, 06 Nov 2011 01:43:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMwSO-000113-Qi for emacs-devel@gnu.org; Sun, 06 Nov 2011 01:43:54 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:49705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMwSO-00010z-PE for emacs-devel@gnu.org; Sun, 06 Nov 2011 01:43:52 -0500 Original-Received: from bb220-255-192-233.singnet.com.sg ([220.255.192.233]:38444 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RMwSN-0004Wt-9u; Sun, 06 Nov 2011 01:43:52 -0500 In-Reply-To: (Mark Lillibridge's message of "Sat, 05 Nov 2011 19:12:04 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145891 Archived-At: Mark Lillibridge writes: > I've found at least one bug (get messages destroys all white space at > the end of the last message already in the mailbox) in Rmail 23 I think that's coming from this code in rmail-get-new-mail: ;; In case of brain damage caused by require-final-newline. (goto-char (point-max)) (skip-chars-backward " \t\n") (delete-region (point) (point-max)) Could you try removing these lines and seeing if the problem persists? The require-final-newline variable is set to nil in rmail mode anyway so this should not be necessary. > Unless told otherwise, I'm going to assume that Rmail 23 is supposed > be using the mboxo/mboxrd mailbox format (see > http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/mail-mbox-formats.html). IIRC, it is supposed to use the mboxrd format. For instance, the unquoting of From lines for message display is handled by this code in rmail-show-message-1: ;; Unquote quoted From lines (while (re-search-forward "^>+From " nil t) (beginning-of-line) (delete-char 1) (forward-line)) > In particular, this means that: > > Each message is preceded by a From_ line and followed by a blank > line. A From_ line is a line that begins with the five characters > 'F', 'r', 'o', 'm', and ' '. > > Rmail 23 does not comply correctly with this. For example, it fails > to add a blank line after the last message. I think that's the purpose of this code from rmail-insert-inbox-text: ;; Determine if a pair of newline message separators need ;; to be added to the new collection of messages. This is ;; the case for all new message collections added to a ;; non-empty mail file. (unless (zerop size) (save-restriction (let ((start (point-min))) (widen) (unless (eq start (point-min)) (goto-char start) (insert "\n\n") (setq size (+ 2 size)))))) (goto-char (point-max)) (or (= (preceding-char) ?\n) (zerop size) (insert ?\n)) Maybe it's not doing the right thing in some circumstances?