all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 4748@emacsbugs.donarmstrong.com
Subject: bug#4748: 23.1; least recently used window - is it?
Date: Sun, 18 Oct 2009 23:28:43 -0700	[thread overview]
Message-ID: <1BFDEAEBA19040FBB0AC56AF03E66C6F@us.oracle.com> (raw)
In-Reply-To: <jwvvdicywr3.fsf-monnier+emacsbugreports@gnu.org>

> The window used by pop-to-buffer depends on so many different factors
> that it's illusory to think you can control it from the outside.

You didn't respond to the question, which was how to replace `switch-to-buffer',
to both (a) keep the same-window and `quit-window' behavior that people are used
to (and presumably want) and (b) respect `special-display-*' and
`pop-up-frames'. Those vars would take precedence, but if their values don't
require using another frame, then the behavior should be to do what
`switch-to-buffer' does now (use the same window).

I don't need this for myself (other than curiosity), but I understood that an
aim was to move away from using `switch-to-buffer' in Emacs code and encourage
the same for 3rd-party code. And I understood that one reason for that was that
`switch-to-buffer' does not respect those use-other-frame variables (that's what
bothers me about it, at least).

If that's not the case, then don't worry about the question. I use
`pop-to-buffer', myself.

FWIW, this came up because I was replacing some code in `bookmark-bmenu-list',
and I wanted to preserve the `switch-to-buffer' that users are used to (and
might prefer), while at the same time making it sane wrt
`special-display-regexps' (for users like me). So far, I'm just using this to
replace the `switch-to-buffer' call - it at least DTRT for one-window frames:

(let ((one-win-p  (one-window-p)))
  (pop-to-buffer (get-buffer-create "*Bookmark List*"))
  (when one-win-p (delete-other-windows)))






  reply	other threads:[~2009-10-19  6:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18  8:41 bug#4748: 23.1; least recently used window - is it? Drew Adams
2009-10-18 10:24 ` martin rudalics
2009-10-18 16:30   ` Drew Adams
2009-10-18 17:36     ` martin rudalics
2009-10-18 18:48       ` Drew Adams
2009-10-19  7:36         ` martin rudalics
2009-10-19  1:58     ` Stefan Monnier
2009-10-19  6:28       ` Drew Adams [this message]
2009-10-19 13:57         ` Stefan Monnier

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=1BFDEAEBA19040FBB0AC56AF03E66C6F@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=4748@emacsbugs.donarmstrong.com \
    --cc=monnier@iro.umontreal.ca \
    /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.