From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Please try Pmail Date: Mon, 19 Jan 2009 23:57:08 -0500 Message-ID: References: <87r6303c31.fsf@cyd.mit.edu> <87ljt83svc.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232427445 1103 80.91.229.12 (20 Jan 2009 04:57:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2009 04:57:25 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 20 05:58:38 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LP8h9-0004fL-Ed for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2009 05:58:35 +0100 Original-Received: from localhost ([127.0.0.1]:50749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LP8fs-0006XD-Cz for ged-emacs-devel@m.gmane.org; Mon, 19 Jan 2009 23:57:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LP8fn-0006TZ-D8 for emacs-devel@gnu.org; Mon, 19 Jan 2009 23:57:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LP8fm-0006TA-Re for emacs-devel@gnu.org; Mon, 19 Jan 2009 23:57:11 -0500 Original-Received: from [199.232.76.173] (port=57612 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LP8fm-0006T3-Oa for emacs-devel@gnu.org; Mon, 19 Jan 2009 23:57:10 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:54266) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LP8fl-0001Ew-LP; Mon, 19 Jan 2009 23:57:09 -0500 Original-Received: from alfajor.home (vpn-132-204-232-174.acd.umontreal.ca [132.204.232.174]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n0K4vmMJ003967; Mon, 19 Jan 2009 23:57:48 -0500 Original-Received: by alfajor.home (Postfix, from userid 20848) id 6D76E1C167; Mon, 19 Jan 2009 23:57:08 -0500 (EST) In-Reply-To: <87ljt83svc.fsf@cyd.mit.edu> (Chong Yidong's message of "Sun, 18 Jan 2009 21:57:27 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3192=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:108006 Archived-At: >>> Thanks. First, the swapping code in pmail should be tweaked to use >>> write-region-annotate, like in Stefan's 2008-12-30 change to >>> tar-mode.el. >> Sounds right. > Actually, there seems to be a problem with doing this. The > straightforward approach for using write-region-annotate is: > (defun pmail-write-region-annotate (start end) > (when (pmail-buffers-swapped-p) > (set-buffer pmail-view-buffer) > (widen) > nil)) Ah, indeed, that's a problem. > The `widen' is necessary because pmail-view-buffer, which contains the > swapped-out buffer contents, is narrowed to the current message. So Pmail displays the messages directly from the raw mbox buffer? How does it deal with character encodings, then? > So we must either (i) put buffer-swapped-with back in and use that, or > (ii) modify annotations to somehow automatically widen and save > restrictions when the current buffer is switched. Or use write-contents-functions, or change the code so the raw mbox buffer is never narrowed (i.e. never shown to the user). Stefan