[Top][All Lists]

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

Re: Buffer listing in multiple frames/ttys

From: Juri Linkov
Subject: Re: Buffer listing in multiple frames/ttys
Date: Wed, 07 Dec 2005 02:52:19 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> I note that `bury-buffer' removes the buffer from the frame-local
> buffer lists of all frames, not just the selected one.  This is an
> unwanted side-effect in this case, as we want the effects of
> `next-buffer' to remain frame-local.  I propose to add an optional
> parameter to `bury-buffer' to support this.

I think this change should be made for all invocations of `bury-buffer',
not only from `next-buffer'.  Also I think recoding a buffer to the
new frame parameter should be made in `bury-buffer' instead of
`next-buffer'.  And so there is no need for a new optional parameter.
Some commands call `bury-buffer' directly, and it would be good to
record their buffers in the frame-local parameter.

> I appended to the end of this message enhanced versions of
> `next-buffer' and `prev-buffer' that eliminate this problem by
> maintaining a new auxiliary frame-local buffer list, called
> `previous-buffer-list'.  `next-buffer' prepends the old buffer to this
> list, and `prev-buffer' searches this list first; otherwise the two
> functions behave as in CVS.

These functions are much better than previous versions, but still
don't work correctly without changes in `bury-buffer'.

Instead of introducing a new frame parameter `previous-buffer-list'
what do you think about reusing the existing frame parameter `buffer-list'?
It could have a special marker delimiting a list of frame's "next" visited
buffers and "previous" visited buffers.  A nil value could serve as
such special marker.  So for example, (frame-parameter nil 'buffer-list)
could contain:

(#<buffer *b+1*> #<buffer *b+2*> nil #<buffer *b-2*> #<buffer *b-1*>)

where buffers until `nil' are buffers added by `switch-to-buffer'
(i.e. the same buffers that are currently recorded in this parameter),
and buffers after `nil' are buffers added by `bury-buffer'.
Then some functions should be changed to understand this new format of
the frame parameter `buffer-list'.

Juri Linkov

reply via email to

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