Miles Bader wrote:
> Bob Rogers <
rogers-emacs@...> writes:
>> 1. Bind find-alternate-file to something different.
>> 2. Add a "[Confirm]" step if nonexistent, as for selecting files or
>> buffers with confirm-nonexistent-file-or-buffer set to t.
>> 3. Do not bind find-alternate-file to anything at all.
>
> How about:
>
> 4. Make find-alternate-file use a yes-or-no-p confirmation prompt if
> the buffer has no associated file. My guess is that the vast
> majority of uses of find-alternate-file are replacing one file
> buffer with another, and that intentionally replacing "special"
> buffers is very rare.
>
> If there are specific modes or buffers for which "replacement"
> _is_ commonly used, then there could be a variable to tell
> find-alternate-file not to confirm that buffer (and a user could
> set the global default value of that variable to turn off all
> confirmation)
The specific mode that leaps to mind is Dired. I often use C-x C-v in
Dired buffers to visit a different directory, just as I do in file
buffers. So how about:
5. Make find-alternate-file use a yes-or-no-p confirmation prompt if the
buffer has an associated process. This would cover *shell* buffers.
--
Kevin Rodgers
Denver, Colorado, USA