all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: display-buffer cleverness - how to tame?
Date: Mon, 04 May 2009 18:41:04 +0200	[thread overview]
Message-ID: <49FF1AA0.9080601@gmx.at> (raw)
In-Reply-To: <002a01c9ccc6$2221c840$0200a8c0@us.oracle.com>

 > 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




  parent reply	other threads:[~2009-05-04 16:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-04  7:41 display-buffer cleverness - how to tame? Drew Adams
2009-05-04  8:38 ` martin rudalics
2009-05-04 14:39   ` Drew Adams
2009-05-04 15:03     ` Miles Bader
2009-05-04 15:49       ` Drew Adams
2009-05-04 18:58         ` Samuel Bronson
2009-05-05  2:50         ` Miles Bader
2009-05-04 16:36     ` Stefan Monnier
2009-05-04 16:41     ` martin rudalics [this message]
2009-05-04 17:13       ` Drew Adams
2009-05-05  7:02         ` martin rudalics
2009-05-05 14:18           ` Drew Adams
2009-05-05 16:33             ` martin rudalics
2009-05-05 16:58               ` Drew Adams
2009-05-05 18:55                 ` martin rudalics
2009-05-05 20:20                   ` Drew Adams
2009-05-06 16:21                     ` martin rudalics
2009-05-06 17:54                       ` Drew Adams
2009-05-07  9:37                         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49FF1AA0.9080601@gmx.at \
    --to=rudalics@gmx.at \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.