all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Mark T. Kennedy" <mkennedy@diamondbackcap.com>,
	"martin rudalics" <rudalics@gmx.at>
Cc: bug-gnu-emacs@gnu.org
Subject: RE: switch-to-buffer-other-frame fails to pop-up window
Date: Thu, 6 Dec 2007 11:48:52 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICEENGEBAA.drew.adams@oracle.com> (raw)
In-Reply-To: <475842B9.6060001@diamondbackcap.com>

> >  > what use case would clash with a change like this?
> >
> > I don't know, maybe there is one.  We could try to provide a third value
> > for `pop-up-frames': If it's 'force `display-buffer' would _always_ try
> > to display the buffer in a new frame regardless of how many times it is
> > already displayed.  What do you think?
>
> that would certainly provide a work-around and make me happy.
>
> but i'm still curious why the intent of pop-up-frames is overridden by
> display-buffer.  there has to be a reason lurking somewhere?

I like the way it works. The use case is that what one is after is for the
buffer to be displayed - that's all. I use non-nil `pop-up-frames' to have
`display-buffer' show a buffer for the first time in a new frame, but not to
always show a buffer in a new frame. That's what `pop-up-frames' is about.

BTW, this is not `display-buffer' _overriding_ `pop-up-frames'; the latter
is made for the former. `pop-up-frames' has no meaning other than for
`display-buffer'.

The relevant doc is the doc string of `display-buffer'. The doc string of
`pop-up-frames' tries to take the shortcut of referring to `display-buffer',
but it should be clearer about what happens if the buffer is already shown
in a frame somewhere. The doc string of `display-buffer' is clear about
this:

 "If `pop-up-frames' is non-nil, make a new frame
  if no window shows BUFFER."

It is the last bit of the logic ("if no window shows BUFFER") that is
missing from the doc string of `pop-up-frames'.

In principle, we could add a new `force' value for `pop-up-frames'. But
there is  existing code that tests `pop-up-frames' and assumes the current
behavior. In some cases, it uses `pop-up-frames' as a guide to user
intentions and practice wrt frames in general. At least some of that code
would likely need to be revisited, to see if the test is still sufficient or
should be changed to test non-nil and non-`force'.






  reply	other threads:[~2007-12-06 19:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 14:48 switch-to-buffer-other-frame fails to pop-up window Mark T. Kennedy
2007-12-04  7:37 ` martin rudalics
2007-12-05 19:55   ` Mark T. Kennedy
2007-12-05 22:11     ` martin rudalics
2007-12-06 18:43       ` Mark T. Kennedy
2007-12-06 19:48         ` Drew Adams [this message]
2007-12-06 20:11           ` Mark T. Kennedy
2007-12-06 22:06             ` Drew Adams
2007-12-07 16:39               ` Mark T. Kennedy
2007-12-07 17:18                 ` Drew Adams
2007-12-07 19:41                 ` Mark T. Kennedy

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=DNEMKBNJBGPAOPIJOOICEENGEBAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=mkennedy@diamondbackcap.com \
    --cc=rudalics@gmx.at \
    /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.