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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64844 in the body.
You can then email your comments to 64844 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#64844; Package emacs. (Tue, 25 Jul 2023 06:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Van Ly <van.ly <at> sdf.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 25 Jul 2023 06:49:02 GMT) Full text and rfc822 format available.

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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64844; Package emacs. (Tue, 25 Jul 2023 14:53:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 64844 <at> debbugs.gnu.org
Subject: Re: bug#64844: 29.1;
 M-x normal-mode is a better suggestion than M-x revert-buffer on new
 unsaved buffer
Date: Tue, 25 Jul 2023 17:53:19 +0300
> 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" <bug-gnu-emacs <at> 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.

Thanks, should be fixed now on the master branch.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 30 Jul 2023 07:13:02 GMT) Full text and rfc822 format available.

Notification sent to Van Ly <van.ly <at> sdf.org>:
bug acknowledged by developer. (Sun, 30 Jul 2023 07:13:02 GMT) Full text and rfc822 format available.

Message #13 received at 64844-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: van.ly <at> sdf.org
Cc: 64844-done <at> debbugs.gnu.org
Subject: Re: bug#64844: 29.1;
 M-x normal-mode is a better suggestion than M-x revert-buffer on new
 unsaved buffer
Date: Sun, 30 Jul 2023 10:12:33 +0300
> Cc: 64844 <at> debbugs.gnu.org
> Date: Tue, 25 Jul 2023 17:53:19 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > 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" <bug-gnu-emacs <at> 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.
> 
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64844; Package emacs. (Wed, 02 Aug 2023 13:13:01 GMT) Full text and rfc822 format available.

Message #16 received at 64844-done <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64844-done <at> debbugs.gnu.org
Subject: Re: bug#64844: 29.1;
 M-x normal-mode is a better suggestion than M-x revert-buffer on new
 unsaved buffer
Date: Wed, 2 Aug 2023 13:12:27 GMT
> Date: Sun, 30 Jul 2023 10:12:33 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> CC: 64844-done <at> debbugs.gnu.org
> 
> 
> No further comments, so I assume the problem is indeed solved, and I'm
> closing this bug.
> 

Didn't make it in the 29.1 release.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64844; Package emacs. (Wed, 02 Aug 2023 14:24:01 GMT) Full text and rfc822 format available.

Message #19 received at 64844-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 64844-done <at> debbugs.gnu.org
Subject: Re: bug#64844: 29.1;
 M-x normal-mode is a better suggestion than M-x revert-buffer on new
 unsaved buffer
Date: Wed, 02 Aug 2023 17:23:57 +0300
> Date: Wed, 2 Aug 2023 13:12:27 GMT
> From: Van Ly <van.ly <at> sdf.org>
> Cc: 64844-done <at> debbugs.gnu.org
> 
> 
> > Date: Sun, 30 Jul 2023 10:12:33 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > CC: 64844-done <at> debbugs.gnu.org
> > 
> > 
> > No further comments, so I assume the problem is indeed solved, and I'm
> > closing this bug.
> > 
> 
> Didn't make it in the 29.1 release.

No, because it was too late, and the change is in a sensitive place.
The issue is also not new: this code was added to Emacs 10 years ago.
Sorry.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 31 Aug 2023 11:24:08 GMT) Full text and rfc822 format available.

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.