emacs-devel
[Top][All Lists]
Advanced

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

Re: display-buffer cleverness - how to tame?


From: martin rudalics
Subject: Re: display-buffer cleverness - how to tame?
Date: Mon, 04 May 2009 18:41:04 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

> It's a joke, right?

No Drew, it's serious.

> Emacs adding DWIM now means that if you want the simple,
> straightforward behavior of old you need to write it yourself?

It's not about adding DWIM.  Let's have a look at "the simple,
straightforward behavior of old": You apparently have a frame with two
side-by-side windows and `pop-up-frames' bound to nil (IIRC
`pop-up-frames' is usually non-nil on your Emacs).  The left window is
the larger one and the right window the least recently used one.

Emacs 22 first tries to split the larger (left) window and fails to do
so because the window is not full-width.  Then Emacs tries to split the
least recently used (right) one and succeeds.  I suppose you were not
aware of this since otherwise you wouldn't have written (in your first
mail on this subject) "the problem seems to be that display-buffer now
tries to split the largest window" where "now" apparently means "Emacs
23".  The difference is that with Emacs 23 `display-buffer' tries to
split the largest window _and_ succeeds in doing so.

So basically you wrote some code that (1) relied on some undocumented
behavior of `display-buffer', and (2) would have failed to DTRT with
more than two windows on your frame or the window on the right not being
the least recently used one.

> I'd sooner copy the Emacs 22 `display-buffer' code and just use that, except
> that it's in C. ;-)

You could try getting the version distributed with XEmacs.  It's in
Elisp and should still exhibit the old behavior ;-)

> You are not making it easier for users (which includes Emacs-Lisp users)...

The present code is more fully documented.  So I hopefully made it
easier for users (which includes Emacs-Lisp users) to complain ...

martin




reply via email to

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