[Top][All Lists]

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

Re: The window-pub branch

From: martin rudalics
Subject: Re: The window-pub branch
Date: Sat, 20 Nov 2010 10:19:51 +0100
User-agent: Thunderbird (Windows/20090302)

> Only if the wrapper doesn't work very well.  And a wrapper cannot
> work very well if it can be bypassed.

Emacs 23 buffer display is a matryoshka of wrappers.  Look at how
applications set or bind all sort of customizable variables to bypass
the user.

> Anyway all I'm asking for is the OPTION to install such wrapper.
> The obvious way to bypass it is simply not to install it.  But as
> long as it is installed, there should be no way to bypass it.
> Otherwise it wouldn't be an honest option.

I reinstalled `display-buffer-function' so you have one additional
layer.  And the override specifier should give you a way to override
anything supplied by an application.  Did you try it, by the way?

But there's still the possibility that an application binds
`display-buffer-names' to override the user.  We should at least have
the byte-compiler complain.

> You speak of "Emacs" as if it were a third party in that game.

Deliberately so.

> There is nothing anywhere outside that would force it to crash
> from zero-sized windows or windows with no buffer.

It's only when I write display code that I can remove invariants like
"every window must be at least one line tall" or "every live window must
have a live buffer associated with it".  When I write code for handling
windows I treat the display code as a black box (or a "third party")
with given restrictions and implied invariants.  When I write code for
displaying buffers I treat the code for handling windows as a black box
with given restrictions and implied invariants.

Here I can still crash the trunk by repeatedly trying to kill *scratch*.

> Yes.  Well, maybe.  At this point I'm just trying to push you towards
> installing such seat and to suggest to use it in your own functions.

The functions I write at the moment should work without such seat.
Otherwise, giving one seat to the application programmer would have the
user caught between two stools.

> Of course in order to prove the fitness of an interface you'd better
> have at least two possible clients.  Here is one more, if you want to:
> http://lists.gnu.org/archive/html/gnu-emacs-sources/2010-05/msg00026.html

The problem with ewm.el is that it would once more hide an option like
`display-buffer-names' because it imposes its own rules on which window
to use for displaying a buffer.  What would you give a user who asked
for a hook to escape the standard bevhavior of ewm?

BTW, in an earlier version of my code `display-buffer-names' did allow
the user to control reusing the four windows on top, bottom, left and
right of a frame.  When I find the time I'll clean up the code and put
it back.


reply via email to

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