GNU bug report logs - #49869
Revert buffer? Yes/No/Maybe

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 4 Aug 2021 08:47:02 UTC

Severity: wishlist

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49869 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#49869: Revert buffer? Yes/No/Maybe
Date: Wed, 04 Aug 2021 12:22:09 +0000
>> There is a new short keybinding to revert the current buffer - just 3 
>> keys: 'C-x x g'.  But then it asks for a confirmation with 4 keys: 'y e 
>> s RET' that is even longer than the command keys. This defeats the 
>> purpose of having the short key sequence. Does 'C-x x g' really need a 
>> confirmation?
>
> It's quite a drastic measure, so I think it does need a confirmation. 
> E.g., if the changes you revert exceed the value of undo-limit, you 
> could really lose your edits.
>
> Since we now have the use-short-answers option, why is it a problem to 
> have to confirm, if you could make it a single key?
>

I had forgotten about use-short-answers, it makes the proposed solution 
even shorter:

(defun revert-buffer-short-answer (&optional args)
  (interactive (list (not current-prefix-arg)))
  (let ((use-short-answers t))
    (revert-buffer args)))

(global-set-key (kbd "C-x x g") 'revert-buffer-short-answer)




This bug report was last modified 3 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.