emacs-devel
[Top][All Lists]
Advanced

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

Why should it be so hard to tell find-dired to use a different window?


From: Trevor Murphy
Subject: Why should it be so hard to tell find-dired to use a different window?
Date: Fri, 21 Sep 2018 00:55:18 -0700
User-agent: mu4e 1.0; emacs 26.1

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.

I’m surprised that it works this way? Does this bother anybody else?

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)))

… so that Emacs would still try very hard to display the Find buffer in the current window, but I could nevertheless override that by customizing `display-buffer-alist'.

Is there any particular reason to keep using switch-to-buffer here?




reply via email to

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