From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: buffer-swap-text and multibyteness Date: Mon, 02 Feb 2009 11:14:56 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1233540897 2431 80.91.229.12 (2 Feb 2009 02:14:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 02:14:57 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 03:16:11 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 1LToM5-0006jn-WF for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 03:16:10 +0100 Original-Received: from localhost ([127.0.0.1]:51366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LToKn-0007Zb-52 for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2009 21:14:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LToKj-0007ZL-Lz for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:14:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LToKi-0007Z9-E2 for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:14:45 -0500 Original-Received: from [199.232.76.173] (port=57756 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LToKi-0007Z6-Al for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:14:44 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:49932) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LToKf-0005OL-Mf; Sun, 01 Feb 2009 21:14:42 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n122EdR9017553; Mon, 2 Feb 2009 11:14:39 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n122EdlY020941; Mon, 2 Feb 2009 11:14:39 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n122Edkh009328; Mon, 2 Feb 2009 11:14:39 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LToKu-0005UG-MB; Mon, 02 Feb 2009 11:14:56 +0900 In-reply-to: (message from Eli Zaretskii on Sat, 31 Jan 2009 21:03:42 +0200) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 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:108549 Archived-At: In article , Eli Zaretskii writes: > I don't know, perhaps I was just confused. It's hard not to be, with > all that mind-boggling swapping that goes on in Rmail between a > unibyte buffer and a multibyte one. A horrible design, if you ask me. > It's little surprise to me that I found so many bugs in Rmail due to > this (and more are still there): one needs constantly to track the > current state of the ``swappiness'', or else all bets are off. > (Quick: if you are currently in rmail-view-buffer, and > rmail-buffers-swapped-p returns non-nil, is the text unibyte or > multibyte?) > We should have simply used 2 separate buffers. I think rmail-buffer and rmail-view-buffer should be set consistently to the unibyte buffer containing RMAIL file and to the multibyte buffer showing one message to a user. And, most of the interactive functions should just do something like this: (set-buffer rmail-buffer) ... (switch-to-buffer rmail-view-buffer) Is the conbination of set-buffer and switch-to-buffer heavier than two buffer-swap-text? --- Kenichi Handa handa@m17n.org