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: buffer-swap-text and multibyteness Date: Sun, 01 Feb 2009 16:43:58 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233595887 29681 80.91.229.12 (2 Feb 2009 17:31:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 17:31:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 18:32:40 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 1LU2ei-0002Uk-II for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 18:32:20 +0100 Original-Received: from localhost ([127.0.0.1]:37252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU2dP-0000XO-Tz for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 12:30:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU2Nn-0001Id-0H for emacs-devel@gnu.org; Mon, 02 Feb 2009 12:14:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU2Nl-0001GN-AO for emacs-devel@gnu.org; Mon, 02 Feb 2009 12:14:50 -0500 Original-Received: from [199.232.76.173] (port=43738 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU2Nl-0001GI-5z for emacs-devel@gnu.org; Mon, 02 Feb 2009 12:14:49 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:3160 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LU2Nj-0001OK-RT; Mon, 02 Feb 2009 12:14:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswEAGy4hknO+IQk/2dsb2JhbACBbsonhBQGgmw X-IronPort-AV: E=Sophos;i="4.37,366,1231131600"; d="scan'208";a="33208735" Original-Received: from 206-248-132-36.dsl.teksavvy.com (HELO ceviche.home) ([206.248.132.36]) by ironport2-out.teksavvy.com with ESMTP; 02 Feb 2009 12:14:47 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 688DCB4115; Sun, 1 Feb 2009 16:43:58 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Sun, 01 Feb 2009 06:13:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:108602 Archived-At: >> It looks problematic indeed. I'm having trouble understanding how >> it works. Part of it might be due to naming: IIUC rmail-view-buffer >> doesn't actually hold the "view" buffer, but instead it holds the >> mbox bytes. > Yes, most of the time rmail-view-buffer holds the original message > collection, because that's what rmail-swap-buffers causes when we > display a message. Having looked more closely at the code I see that the main problem is that, in order to keep Rmail's original design, all the buffer-local vars are local to the `rmail-buffer'. But now that we use 2 different buffers, some vars should be local to the `rmail-buffer' and others local to the other buffer (currently called `rmail-view-buffer'). Since we haven't made such a change, we end up having to swap buffer texts all the time so that all the work (be it on the view or the data) is always done within the rmail-buffer. I think we should rename rmail-view-buffer to rmail-data-buffer, and move vars like `rmail-message-vector' from rmail-buffer to rmail-data-buffer. Then we can stop swapping the two buffers all the time. But such changes spell "lots of breakage". Stefan