emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why should it be so hard to tell find-dired to use a different windo


From: Stephen Leake
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

Trevor Murphy <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]