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 <at> linkov.net
Subject: bug#49869: Revert buffer? Yes/No/Maybe
Date: Wed, 04 Aug 2021 12:37:43 +0000
>> (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)
>
> If you propose this as something people who want this could do in their 
> init files, then I agree.
>

No, I propose this as a solution to Juri's problem, instead of his 
proposed solution to "revert the buffer immediately" with C-x x g, which 
is indeed too drastic.  Something even better to take Lars' suggestion (do 
not ask confirmation when the buffer has not been modified) into account:

(defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes)
  (interactive (list (not current-prefix-arg)))
  (let ((use-short-answers t)
	(noconfirm (not (buffer-modified-p))))
    (revert-buffer ignore-auto noconfirm preserve-modes)))




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

Previous Next


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