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: Sat, 31 Jan 2009 20:43:57 -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 1233452659 15379 80.91.229.12 (1 Feb 2009 01:44:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2009 01:44:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 01 02:45:33 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 1LTROt-0005lH-AG for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2009 02:45:31 +0100 Original-Received: from localhost ([127.0.0.1]:50602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTRNa-0005UP-Pq for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2009 20:44:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTRNW-0005UA-7d for emacs-devel@gnu.org; Sat, 31 Jan 2009 20:44:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTRNT-0005Ty-Qe for emacs-devel@gnu.org; Sat, 31 Jan 2009 20:44:04 -0500 Original-Received: from [199.232.76.173] (port=60365 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTRNT-0005Tv-LY for emacs-devel@gnu.org; Sat, 31 Jan 2009 20:44:03 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:45871 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTRNS-00011S-9S; Sat, 31 Jan 2009 20:44:02 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAPOMhEnO+IQk/2dsb2JhbACBbcYihBQGgmw X-IronPort-AV: E=Sophos;i="4.37,357,1231131600"; d="scan'208";a="33116285" Original-Received: from 206-248-132-36.dsl.teksavvy.com (HELO pastel.home) ([206.248.132.36]) by ironport2-out.teksavvy.com with ESMTP; 31 Jan 2009 20:43:58 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 34EDE8229; Sat, 31 Jan 2009 20:43:57 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Sun, 01 Feb 2009 00:02:50 +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:108487 Archived-At: >> >> In tar-mode (and the way I imagine buffer-swap-text to be used), >> >> swapping the buffer is a rare operation that's basically only done >> >> when the the major mode changes. >> >> > In Rmail, we do it each time a new message is being displayed. >> >> Why??? > Because each message needs to be decoded before it is shown. The > decoded text goes to the rmail-view-buffer, and we then call > rmail-swap-buffers to show the decoded text in the rmail-buffer. See > rmail-show-message for the gory details. 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. Stefan