emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: buffer-swap-text and multibyteness


From: Kenichi Handa
Subject: Re: buffer-swap-text and multibyteness
Date: Mon, 02 Feb 2009 11:14:56 +0900

In article <address@hidden>, Eli Zaretskii <address@hidden> 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
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]