unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to revert buffer from "Save file?" prompt?
Date: Mon, 07 Jun 2021 18:42:20 +0300	[thread overview]
Message-ID: <87pmwxlm03.fsf@osv.gnss.ru> (raw)
In-Reply-To: <87czsxaebd.fsf@telefonica.net> ("Óscar Fuentes"'s message of "Mon, 07 Jun 2021 17:23:50 +0200")

Ó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	other threads:[~2021-06-07 15:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 14:24 How to revert buffer from "Save file?" prompt? Sergey Organov
2021-06-07 14:28 ` Eli Zaretskii
2021-06-08 15:18   ` Sergey Organov
2021-06-08 15:41     ` Eli Zaretskii
2021-06-08 17:15       ` Sergey Organov
2021-06-10 17:14       ` Sergey Organov
2021-06-08 15:51     ` Stefan Möding
2021-06-08 17:56       ` Sergey Organov
2021-06-07 15:23 ` Óscar Fuentes
2021-06-07 15:42   ` Sergey Organov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmwxlm03.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).