[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47075: [FEATURE REQUEST] kill-buffer: option to prompt to save
From: |
Federico Tedin |
Subject: |
bug#47075: [FEATURE REQUEST] kill-buffer: option to prompt to save |
Date: |
Thu, 16 Sep 2021 01:39:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Sounds like a good improvement, but what do you think about using
read-answer instead of read-char?
Boruch Baum <boruch_baum@gmx.com> writes:
> Evaluating function `kill-buffer' for a modified file buffer leads to a
> prompt "foo modified, kill anyway (y or n)". Thus, for the common case
> of a user wanting to save and kill a modified buffer, the user must at
> this point perform three operations: respond no to the prompt, save the
> file, perform the kill-buffer operation a second time.
>
> It would be more convenient for the prompt to offer an option to 'save
> and kill' the buffer, so that no extra steps be required.
>
> I had wanted to offer a patch for this, but I couldn't find the elisp
> function that was directly causing the prompt. My guess is that it is
> directly called by the C source code for function kill-buffer, but I
> don't have the C source code available. If so, the idea would likely be to
> replace a call to y-or-n-p with a read-char loop, checking for (y Y n N
> s S).
>
> --
> hkp://keys.gnupg.net
> CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#47075: [FEATURE REQUEST] kill-buffer: option to prompt to save,
Federico Tedin <=