Subject: bug#64844: closed (Re: bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 30 Jul 2023 07:13:02 +0000

Your bug report

#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
64844: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64844
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sun, 30 Jul 2023 10:12:33 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Cc: [email-masked]
> Date: Tue, 25 Jul 2023 17:53:19 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > Date: Tue, 25 Jul 2023 06:47:56 GMT
> > From:  Van Ly via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <[email-masked]>
> > 
> > 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.
> 
> Thanks, should be fixed now on the master branch.

No further comments, so I assume the problem is indeed solved, and I'm
closing this bug.

Subject: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
From: Van Ly <[email-masked]>
To: [email-masked]
Date: Tue, 25 Jul 2023 06:47:56 GMT
List-Id: <debbugs-submit.debbugs.gnu.org>

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