unofficial mirror of emacs-devel@gnu.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: Tue, 05 May 2009 09:02:25 +0200	[thread overview]
Message-ID: <49FFE481.1070102@gmx.at> (raw)
In-Reply-To: <000e01c9ccdb$b0997180$c2b22382@us.oracle.com>

 > The question I have now is how to impose, in a particular call to
 > `display-buffer', *not* splitting a window if it is not full-width? That is, how
 > to reinstate that pre-Emacs 23 splitting criterion (temporarily)?

Emacs 22 did split a non-full-width window vertically and from your
previous posts you even relied on and wanted that behavior.  The only
new twist is that Emacs 23 may split the non-full-width largest window
even when it's not the least recently used one.

 > I'd also like to know how to tell `display-buffer' not to split the selected
 > window, and how to tell it specifically which window to split. Those approaches
 > would also solve the problem I see here (in alternative ways), and that
 > knowledge would be generally helpful (to me, at least).

That's what `split-window-preferred-function' is all about.  It gets
called with the window to split and you can temporarily bind your own
function to that.  That function would check if the window to split is
the selected one and, if that is the case, split another one instead
provided such a window exists.  BTW, your example is a second reason why
`split-window-preferred-function' should be called with an argument, so
I plan to leave the current calling convention alone.

 >> 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.
 >
 > Which is not a problem here - that cannot be the case in my context. But it is
 > good to know.

If you as designer are in full control of the context then why do you
rely on `display-buffer' in the first place?  The whole idea of
`display-buffer' is to shift control to the users' customizations ...

martin





  reply	other threads:[~2009-05-05  7:02 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
2009-05-04 17:13       ` Drew Adams
2009-05-05  7:02         ` martin rudalics [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=49FFE481.1070102@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).