unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
@ 2023-07-25  6:47 Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-07-25 14:53 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-07-25  6:47 UTC (permalink / raw)
  To: 64844

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]


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


[-- Attachment #2: emacs bug report --]
[-- Type: application/octet-stream, Size: 3558 bytes --]






In GNU Emacs 29.1 (build 2, aarch64--linux-gnu, X toolkit, cairo version
 1.16.0, Xaw3d scroll bars) of 2023-07-25 built on x23
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --prefix=/usr/X/23/pkg/emacs-29.1-sink
 --srcdir=/usr/X/23/src/emacs/emacs-29.1 --without-pop
 --without-mailutils --with-rsvg --without-compress-install
 --localstatedir=/var --build=aarch64--linux-gnu
 --host=aarch64--linux-gnu --with-tree-sitter --with-native-compilation
 --disable-acl --with-webp --without-sound --with-lcms2
 --with-x-toolkit=lu --with-libsystemd'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LC_ALL: 
  value of $LC_COLLATE: en_AU.UTF-8
  value of $LC_CTYPE: en_AU.UTF-8
  value of $LC_MESSAGES: en_AU.UTF-8
  value of $LC_MONETARY: en_AU.UTF-8
  value of $LC_NUMERIC: en_AU.UTF-8
  value of $LC_TIME: en_AU.UTF-8
  value of $LANG: en_AU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Prog

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt
help-fns radix-tree files-x wombat-theme comp comp-cstr warnings icons
subr-x rx cl-seq cl-macs cl-extra help-mode cl-loaddefs cl-lib
term/xterm xterm byte-opt gv bytecomp byte-compile rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit xinput2 x multi-tty make-network-process native-compile
emacs)

Memory information:
((conses 16 102083 5440)
 (symbols 48 7510 0)
 (strings 32 25273 4332)
 (string-bytes 1 855858)
 (vectors 16 18880)
 (vector-slots 8 293276 10371)
 (floats 8 35 30)
 (intervals 56 260 0)
 (buffers 984 14))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
  2023-07-25  6:47 bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-07-25 14:53 ` Eli Zaretskii
  2023-07-30  7:12   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-07-25 14:53 UTC (permalink / raw)
  To: Van Ly; +Cc: 64844

> 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@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
  2023-07-25 14:53 ` Eli Zaretskii
@ 2023-07-30  7:12   ` Eli Zaretskii
  2023-08-02 13:12     ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-07-30  7:12 UTC (permalink / raw)
  To: van.ly; +Cc: 64844-done

> Cc: 64844@debbugs.gnu.org
> Date: Tue, 25 Jul 2023 17:53:19 +0300
> From: Eli Zaretskii <eliz@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@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
  2023-07-30  7:12   ` Eli Zaretskii
@ 2023-08-02 13:12     ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-02 14:23       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-02 13:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 64844-done


> Date: Sun, 30 Jul 2023 10:12:33 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> CC: 64844-done@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.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer
  2023-08-02 13:12     ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-02 14:23       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-02 14:23 UTC (permalink / raw)
  To: Van Ly; +Cc: 64844-done

> Date: Wed, 2 Aug 2023 13:12:27 GMT
> From: Van Ly <van.ly@sdf.org>
> Cc: 64844-done@debbugs.gnu.org
> 
> 
> > Date: Sun, 30 Jul 2023 10:12:33 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > CC: 64844-done@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-02 14:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25  6:47 bug#64844: 29.1; M-x normal-mode is a better suggestion than M-x revert-buffer on new unsaved buffer Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-25 14:53 ` Eli Zaretskii
2023-07-30  7:12   ` Eli Zaretskii
2023-08-02 13:12     ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-02 14:23       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).