[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36122: A second find-dired clobbers the first's buffer
From: |
Juri Linkov |
Subject: |
bug#36122: A second find-dired clobbers the first's buffer |
Date: |
Tue, 09 Jul 2019 23:18:22 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> Do find-dired on directory A.
>> Then do find-dired on directory B.
>> A second find-dired clobbers the first's buffer!
>> Imagine if there could only be one Dired buffer in emacs.
>> Well, the same goes for find-dired.
>
> That's how the kinda related commands like M-x grep work -- if you want
> more than one, you have to rename them. So I think this works as
> advertised.
Yes, there are many ways to do this:
(add-hook 'dired-after-readin-hook 'rename-uniquely)
(add-hook 'compilation-mode-hook 'rename-uniquely)
or better
(setq compilation-buffer-name-function
(lambda (mode-name)
(generate-new-buffer-name
(concat "*" (downcase mode-name) "*"))))
...