GNU bug report logs - #78124
30.1; `revert-buffer' regression

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 28 Apr 2025 23:22:04 UTC

Severity: normal

Tags: notabug

Found in version 30.1

Full log


Message #8 received at 78124 <at> debbugs.gnu.org (full text, mbox):

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 78124 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#78124: 30.1; `revert-buffer' regression
Date: Tue, 29 Apr 2025 08:07:47 +0200
Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> I didn't find anything about this in NEWS, so I'm assuming this change
> in behavior isn't intended.  And I HOPE it's not intended.
>
> emacs -Q
>
> Visit any file, say foo.el.
>
> Use `C-x C-q' to make the buffer read-only.
>
> M-: (revert-buffer t t)
>
> The buffer should be changed back to writable, but it remains
> read-only.  This is not the case in any prior Emacs release.

This describes the effect of…

  [NEWS]
  ** New variable 'revert-buffer-restore-functions'.
  It helps to preserve various states after reverting the buffer.

  [files.el]
  (defvar revert-buffer-restore-functions '(revert-buffer-restore-read-only)
    "Functions to preserve any state during `revert-buffer'.
    …")

… if I am not mistaken?

> Reversion should restore the state of the saved file to the buffer,
> including whether the file itself is read-only.
>
> I bind this command to F5, so the key reverts, as on Windows:
>
> (defun revert-buffer-no-confirm ()
>   "Revert buffer without confirmation."
>   (interactive) (revert-buffer t t))
>
> Useless now.
>
> In GNU Emacs 30.1 (build 2, x86_64-w64-mingw32) of 2025-02-23 built on
>  AVALON
> Windowing system distributor 'Microsoft Corp.', version 10.0.26100
> System Description: Microsoft Windows 10 Pro (v10.0.2009.26100.3775)




This bug report was last modified 46 days ago.

Previous Next


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