unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
@ 2023-08-01 11:13 Eason Huang
  2023-08-01 13:20 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Eason Huang @ 2023-08-01 11:13 UTC (permalink / raw)
  To: 64989

Hello Emacs,

When update to the new released Emacs 29.1, I found that when comment or
uncomment lines in emacs-lisp-mode will show message in minibuffer as
below:
```
combine-change-calls: buffer-undo-list broken
```
Steps to reproduce:
1. create a test.el file with any Elisp code. such as:
```
(message "Test")
```
2. start emacs and open the test.el file with `emacs -Q ~/test.el`
3. Use C-x C-; (comment-line) to comment the code in test.el
4. Now you will see the message mentioned above.

This issue also happened on Emacs 29.1 on Windows OS.

----
Best regard, Eason Huang


In GNU Emacs 29.1 (build 1, x86_64-apple-darwin22.6.0, NS appkit-2299.70
 Version 13.5 (Build 22G74), git sha1 a9b28224af0) of 2023-07-30 built on macbook
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.5

Configured using:
 'configure --with-native-compilation=aot --without-dbus
 'CPPFLAGS=-I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath
 /opt/local/lib/gcc12
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
 -arch x86_64''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  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
  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 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 vc-git diff-mode easy-mmode
vc-dispatcher shortdoc text-property-search help-fns radix-tree
cl-loaddefs comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv
cl-extra help-mode bytecomp byte-compile cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win 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 kqueue cocoa ns lcms2 multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 91885 14315)
 (symbols 48 7745 3)
 (strings 32 22830 1629)
 (string-bytes 1 698877)
 (vectors 16 17037)
 (vector-slots 8 356967 18443)
 (floats 8 85 110)
 (intervals 56 538 16)
 (buffers 984 14))






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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-01 11:13 bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer Eason Huang
@ 2023-08-01 13:20 ` Eli Zaretskii
  2023-08-12  6:43   ` Eli Zaretskii
  2023-08-26 15:09   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2023-08-01 13:20 UTC (permalink / raw)
  To: Eason Huang, Stefan Monnier; +Cc: 64989

> From: Eason Huang <aqua0210@foxmail.com>
> Date: Tue, 01 Aug 2023 19:13:59 +0800
> 
> Hello Emacs,
> 
> When update to the new released Emacs 29.1, I found that when comment or
> uncomment lines in emacs-lisp-mode will show message in minibuffer as
> below:
> ```
> combine-change-calls: buffer-undo-list broken
> ```
> Steps to reproduce:
> 1. create a test.el file with any Elisp code. such as:
> ```
> (message "Test")
> ```
> 2. start emacs and open the test.el file with `emacs -Q ~/test.el`
> 3. Use C-x C-; (comment-line) to comment the code in test.el
> 4. Now you will see the message mentioned above.

Thanks.

Stefan, I think this is due to the commit below:

| Author:     Stefan Monnier <monnier@iro.umontreal.ca>
| AuthorDate: Fri Jan 13 17:38:04 2023 -0500
| Commit:     Stefan Monnier <monnier@iro.umontreal.ca>
| CommitDate: Fri Jan 13 17:38:04 2023 -0500
|
|     * lisp/subr.el (combine-change-calls-1): Fix bug#60467
|
|     Don't stop at timestamps.  Strip them for now, to be on the safe side.
|     Don't merge into `master` where we'll use a better fix.

My "partial bisecting" indicates that the bug was introduced between
Dec 31, 2022 and Jan 31, 2023, and the above is the only commit
in-between that could matter.

If indeed this is the culprit, can we perhaps backport the "better
fix" from master to the emacs-29 branch?





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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-01 13:20 ` Eli Zaretskii
@ 2023-08-12  6:43   ` Eli Zaretskii
  2023-08-16 16:12     ` Gregory Heytings
  2023-08-24  6:19     ` Eli Zaretskii
  2023-08-26 15:09   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2023-08-12  6:43 UTC (permalink / raw)
  To: monnier; +Cc: aqua0210, 64989

Ping!  Stefan, any suggestions?

> Cc: 64989@debbugs.gnu.org
> Date: Tue, 01 Aug 2023 16:20:20 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Eason Huang <aqua0210@foxmail.com>
> > Date: Tue, 01 Aug 2023 19:13:59 +0800
> > 
> > Hello Emacs,
> > 
> > When update to the new released Emacs 29.1, I found that when comment or
> > uncomment lines in emacs-lisp-mode will show message in minibuffer as
> > below:
> > ```
> > combine-change-calls: buffer-undo-list broken
> > ```
> > Steps to reproduce:
> > 1. create a test.el file with any Elisp code. such as:
> > ```
> > (message "Test")
> > ```
> > 2. start emacs and open the test.el file with `emacs -Q ~/test.el`
> > 3. Use C-x C-; (comment-line) to comment the code in test.el
> > 4. Now you will see the message mentioned above.
> 
> Thanks.
> 
> Stefan, I think this is due to the commit below:
> 
> | Author:     Stefan Monnier <monnier@iro.umontreal.ca>
> | AuthorDate: Fri Jan 13 17:38:04 2023 -0500
> | Commit:     Stefan Monnier <monnier@iro.umontreal.ca>
> | CommitDate: Fri Jan 13 17:38:04 2023 -0500
> |
> |     * lisp/subr.el (combine-change-calls-1): Fix bug#60467
> |
> |     Don't stop at timestamps.  Strip them for now, to be on the safe side.
> |     Don't merge into `master` where we'll use a better fix.
> 
> My "partial bisecting" indicates that the bug was introduced between
> Dec 31, 2022 and Jan 31, 2023, and the above is the only commit
> in-between that could matter.
> 
> If indeed this is the culprit, can we perhaps backport the "better
> fix" from master to the emacs-29 branch?





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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-12  6:43   ` Eli Zaretskii
@ 2023-08-16 16:12     ` Gregory Heytings
  2023-08-24  6:19     ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Gregory Heytings @ 2023-08-16 16:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: aqua0210, monnier, 64989


As mentioned in bug#60467, this is the same bug.  I suggest backporting 
d622602452 to emacs-29 once you are confident enough that it does not 
break anything (if it does indeed not break anything!).






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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-12  6:43   ` Eli Zaretskii
  2023-08-16 16:12     ` Gregory Heytings
@ 2023-08-24  6:19     ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2023-08-24  6:19 UTC (permalink / raw)
  To: monnier; +Cc: aqua0210, 64989

Ping! Ping!

> Cc: aqua0210@foxmail.com, 64989@debbugs.gnu.org
> Date: Sat, 12 Aug 2023 09:43:54 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> Ping!  Stefan, any suggestions?
> 
> > Cc: 64989@debbugs.gnu.org
> > Date: Tue, 01 Aug 2023 16:20:20 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > > From: Eason Huang <aqua0210@foxmail.com>
> > > Date: Tue, 01 Aug 2023 19:13:59 +0800
> > > 
> > > Hello Emacs,
> > > 
> > > When update to the new released Emacs 29.1, I found that when comment or
> > > uncomment lines in emacs-lisp-mode will show message in minibuffer as
> > > below:
> > > ```
> > > combine-change-calls: buffer-undo-list broken
> > > ```
> > > Steps to reproduce:
> > > 1. create a test.el file with any Elisp code. such as:
> > > ```
> > > (message "Test")
> > > ```
> > > 2. start emacs and open the test.el file with `emacs -Q ~/test.el`
> > > 3. Use C-x C-; (comment-line) to comment the code in test.el
> > > 4. Now you will see the message mentioned above.
> > 
> > Thanks.
> > 
> > Stefan, I think this is due to the commit below:
> > 
> > | Author:     Stefan Monnier <monnier@iro.umontreal.ca>
> > | AuthorDate: Fri Jan 13 17:38:04 2023 -0500
> > | Commit:     Stefan Monnier <monnier@iro.umontreal.ca>
> > | CommitDate: Fri Jan 13 17:38:04 2023 -0500
> > |
> > |     * lisp/subr.el (combine-change-calls-1): Fix bug#60467
> > |
> > |     Don't stop at timestamps.  Strip them for now, to be on the safe side.
> > |     Don't merge into `master` where we'll use a better fix.
> > 
> > My "partial bisecting" indicates that the bug was introduced between
> > Dec 31, 2022 and Jan 31, 2023, and the above is the only commit
> > in-between that could matter.
> > 
> > If indeed this is the culprit, can we perhaps backport the "better
> > fix" from master to the emacs-29 branch?
> 
> 
> 
> 





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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-01 13:20 ` Eli Zaretskii
  2023-08-12  6:43   ` Eli Zaretskii
@ 2023-08-26 15:09   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-28 16:13     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-26 15:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Eason Huang, 64989

>> When update to the new released Emacs 29.1, I found that when comment or
>> uncomment lines in emacs-lisp-mode will show message in minibuffer as
>> below:
>> ```
>> combine-change-calls: buffer-undo-list broken
>> ```
>> Steps to reproduce:
>> 1. create a test.el file with any Elisp code. such as:
>> ```
>> (message "Test")
>> ```
>> 2. start emacs and open the test.el file with `emacs -Q ~/test.el`
>> 3. Use C-x C-; (comment-line) to comment the code in test.el
>> 4. Now you will see the message mentioned above.
>
> Thanks.
>
> Stefan, I think this is due to the commit below:

Yup.  The message is just wrong in this case: (cdr ptr) is nil simply
because `buffer-undo-list` was nil initially, not because the
`buffer-undo-list` has been shortened by the GC.

> If indeed this is the culprit, can we perhaps backport the "better
> fix" from master to the emacs-29 branch?

That would work as well.  The patch below should do the trick, tho, if
you prefer to keep changes to a minimum.


        Stefan


diff --git a/lisp/subr.el b/lisp/subr.el
index 28473f1d38c..ec30637b526 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -5002,7 +5002,7 @@ combine-change-calls-1
 			;; Don't include a timestamp entry.
 			(setcdr ptr (cddr ptr))
 		      (setq ptr (cdr ptr))))
-		  (unless (cdr ptr)
+		  (unless (or (cdr ptr) (null old-bul))
 		    (message "combine-change-calls: buffer-undo-list broken"))
 		  (setcdr ptr nil)
 		  (push ap-elt buffer-undo-list)






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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-26 15:09   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-28 16:13     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-28 16:35       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-28 16:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Eason Huang, 64989-done

> That would work as well.  The patch below should do the trick, tho, if
> you prefer to keep changes to a minimum.

Pushed to `emacs-29`.


        Stefan






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

* bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer
  2023-08-28 16:13     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-28 16:35       ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2023-08-28 16:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: aqua0210, 64989-done

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eason Huang <aqua0210@foxmail.com>,  64989-done@debbugs.gnu.org
> Date: Mon, 28 Aug 2023 12:13:24 -0400
> 
> > That would work as well.  The patch below should do the trick, tho, if
> > you prefer to keep changes to a minimum.
> 
> Pushed to `emacs-29`.

Thanks!





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

end of thread, other threads:[~2023-08-28 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 11:13 bug#64989: 29.1; Comment or uncomment lines in elisp-mode will show message in minibuffer Eason Huang
2023-08-01 13:20 ` Eli Zaretskii
2023-08-12  6:43   ` Eli Zaretskii
2023-08-16 16:12     ` Gregory Heytings
2023-08-24  6:19     ` Eli Zaretskii
2023-08-26 15:09   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-28 16:13     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-28 16:35       ` 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).