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: Stefan Monnier
Subject: Re: buffer-swap-text and multibyteness
Date: Sun, 01 Feb 2009 16:43:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> 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




reply via email to

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