[Top][All Lists]

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

Re: Window configurations

From: martin rudalics
Subject: Re: Window configurations
Date: Wed, 12 May 2010 15:03:59 +0200
User-agent: Thunderbird (Windows/20090302)

>> ... And, obviously, stacks have the usual annoying attitude to
>> forget about their tops, so sooner or later someone will come up and ask
>> for a ring or eventually a buffer history tree for each window and some
>> way to navigate it.
> You're already lost if you plan to expose details of your design to users
> or packages.  If people want rings or history, they can still implement
> it on top of your design as a whole.  It is then their responsibility to
> make their feature conclusive to yours.

There's hardly anything to implement "on top" of this.  The primitives
are `set-window-buffer' and `kill-buffer' so any implementation on top
of this would have to hook into `window-configuration-change-hook' and

> One mistake is to cater for windows on the same level of generality as you
> obviously do for low level lisp.  Of course you want functions "cons" etc.
> to allow generation of arbitrarily complex lisp structures, but it cannot
> be the point of "split-window" to generate arbitrarily complex
> window-trees,

I'm not sure whether I get your point.  But windows are first class
citizens in the Elisp world and `split-window' must be allowed to create
arbitrarily complex window trees on an arbitrarily complex machine.

> (and anyway the result of some such is not a "window-configuration" but at
> most a "window-state").

In my book a "window configuration" is "the state of all windows".

> The other mistake is _not_ to cater for windows on the same level of
> _reliability_ as you obviously do for low level lisp.  "Cons" doesn't work
> "intuitively" in the sense of "heuristically", and one has to accept that
> there is no other "intuitively right window" to display some buffer except
> the exactly one defined location where the user wants to see it.

The question which buffer I want to display must be solved heuristically
because it's too complex to analyze the intentions of each and every
Emacs user (and possibly provide the necessary customizations) in Elisp.
The heuristics should guess the "intuitively right window" in a way
which can be roughly measured by the number of postings criticizing its

> And that is actually what "window-configuration" can only mean:  A way to
> define windows for particular content (aka. buffers) _before_ the window
> exists physically.

IIUC that's what packages like ECB do.  And ECB leaves it to Emacs and
its users to modify the configuration/state of the edit area.

>  From then on it is easy, you just need to tell "display-buffer" to use
> that
> window rsp. to generate it if it doesn't yet exist.


reply via email to

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