GNU bug report logs - #64844
29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer

Previous Next

Package: emacs;

Reported by: Van Ly <van.ly <at> sdf.org>

Date: Tue, 25 Jul 2023 06:49:02 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Van Ly <van.ly <at> sdf.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1;
 M-x normal-mode is a better suggestion than M-x revert-buffer on new
 unsaved buffer
Date: Tue, 25 Jul 2023 06:47:56 GMT
[Message part 1 (text/plain, inline)]
A new buffer to a new file path before first save with adjustment to
mode kind and comment start prefix convention triggers the suggestion to

 M-x revert-buffer

for change to take effect, which turns out to be incorrect for a
buffer never before saved to file.

 M-x normal-mode

does the job correctly.

Steps to recreate

 1. run, emacs -Q -nw
 2. load theme womat for readability, dark blue on black is unreadable on input buffer below mode line
 3. open blank buffer to file without saving, /tmp/x
 4. type at top of file, # This comment line is left intentionally blank. -*- prog -*-
 5. add prop line, M-x add-file-local-variable-prop-line
 6. enter, comment-start: , "# "
 7. *Messages* buffer says, For this change to take effect revisit file using M-x revert-buffer
 8. *Messages* says, revert-buffer-insert-file-contents--default-function: Cannot revert nonexistent file /tmp/x
 9. M-x normal-mode ; does the job suggested at 7. above

[x-bug-report.text (application/octet-stream, attachment)]

This bug report was last modified 1 year and 296 days ago.

Previous Next


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