help-gnu-emacs
[Top][All Lists]
Advanced

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

Aliased buffers


From: Chris Newton
Subject: Aliased buffers
Date: Tue, 4 Oct 2011 08:11:36 -0600

Greetings,

Is there anything like aliased buffers? What I mean by that is a
buffer that has its own name, its own entry in the buffer list, but
all other aspects are from (not initially copied from) a base buffer.
An indirect buffer doesn't go this far.

Here is my use case. I have one buffer, which happens to be an
ansi-term that runs a program and displays its output. That term
buffer supplies all the data for multiple conceptual things that
correspond to a 'buffer' in Emacs. It would be really nice to see each
one as a proper buffer in Emacs with every function that deals with
buffers. This term buffer can switch between showing each piece of
data, so if there was such a thing as aliased buffers it could switch
to showing the right data depending on which aliased buffer is the
current buffer. All user interaction with the data would be handled
through the normal term-mode.

I briefly tried using indirect buffers to achieve this, but that
doesn't seem to be possible. Too many things rely on current-buffer,
and advising current-buffer doesn't really work since its so integral
to the C runtime. Since its a term-mode buffer, I cloned the buffer
but nearly everything in term-mode acts on the buffers process, which
doesn't exist in an indirect clone of the real term buffer. It appears
that processes refer to a buffer, not the other way around so you can
only have a process associated with a single buffer.

Thank you,
Chris Newton



reply via email to

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