From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Why should it be so hard to tell find-dired to use a different window?
Date: Sat, 22 Sep 2018 09:25:15 -0500 [thread overview]
Message-ID: <86efdlmwxg.fsf@stephe-leake.org> (raw)
In-Reply-To: <m11s9n474p.fsf@gmail.com> (Trevor Murphy's message of "Fri, 21 Sep 2018 00:55:18 -0700")
Trevor Murphy <trevor.m.murphy@gmail.com> writes:
> I just noticed that `find-dired' and friends use `switch-to-buffer' as
> a subroutine. Since this does not go through the `display-buffer'
> mechanism, it’s really hard for me to control where Emacs displays the
> Find buffer. I’m currently advising `find-dired' to use
> `pop-to-buffer' instead.
See the Gnu ELPA package 'other-frame-window'; it addresses this issue
in a more general way.
> I’m surprised that it works this way? Does this bother anybody else?
Yes, which is why I wrote that package, with help from Stefan Monnier.
> Like, I could imagine an alternate world where that call to
> `switch-to-buffer' could be replaced with something as heavy-handed as
> …
>
> (pop-to-buffer (get-buffer-create "*Find*")
> '(display-buffer-same-window (inhibit-same-window)))
That's essentially what 'other-frame-window' does, as well as defining
prefix keys for other-frame and other-window.
> Is there any particular reason to keep using switch-to-buffer here?
No, but it's hard fighting inertia.
--
-- Stephe
next prev parent reply other threads:[~2018-09-22 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 7:55 Why should it be so hard to tell find-dired to use a different window? Trevor Murphy
2018-09-21 14:52 ` Stefan Monnier
2018-09-22 14:25 ` Stephen Leake [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-23 0:20 Trevor Murphy
2018-09-29 6:40 ` Eli Zaretskii
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=86efdlmwxg.fsf@stephe-leake.org \
--to=stephen_leake@stephe-leake.org \
--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).