help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to revert buffer from "Save file?" prompt?


From: Sergey Organov
Subject: Re: How to revert buffer from "Save file?" prompt?
Date: Mon, 07 Jun 2021 18:42:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Óscar Fuentes <ofv@wanadoo.es> writes:

> Sergey Organov <sorganov@gmail.com> writes:
>
>> When I have a modified buffer and run, say "compile", emacs asks to:
>>
>> Save file /home/osv/f/firm/make/defaults.make? (y, n, !, ., q, C-r, d or C-h)
>>
>> and the set of choices doesn't seem to include "discard changes", or
>> "revert buffer" in emacs terminology.
>>
>> What is the most convenient way to revert this particular buffer once
>> I'm there at this prompt?
>
> What you ask for seems quite dangerous. Better to not make it
> convenient.

Well, I'm willing to take the risk. I can already see diff with 'd', see
the buffer with 'C-r', so I have all the tools to make sure I mean to
discard the changes, and then Emacs will still ask me:

Revert buffer from file /home/osv/f/firm/make/defaults.make? (y or n)

right?

In the end, doesn't seem to be that dangerous to me.

Is there a way to add features to this prompt through customizations?
I'd then opt for C-M-g: revert the buffer.

>
> Right now you need to cancel the `compile' command at the prompt with
> C-g, switch to the buffer and revert it with `revert-buffer'.

Thanks, this way I do know, but often it's very inconvenient, especially
when there are multiple buffers to handle.

-- Sergey Organov




reply via email to

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