unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list
@ 2021-03-03 22:45 Michael Heerdegen
  2021-03-04  8:35 ` martin rudalics
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2021-03-03 22:45 UTC (permalink / raw)
  To: 46908; +Cc: Yuan Fu


Hello,

after using `undo', `buffer-undo-list' often contains entries
referencing several or dozens of markers (seemingly unrelated to
overlays or such; I dunno from where they originate).  I know this
happens in current Emacs master, and I also found the problem in the
27.1 coming with Debian testing, build from 2020-11-08.  I tried in X.

I measure the count of different marker objects in a buffer's
`buffer-undo-list' with this function:

#+begin_src emacs-lisp
(defun count-markers-in-buffer-undo-list ()
  "Message number of (different) markers in `buffer-undo-list'."
  (interactive)
  (require 'cl-lib)
  (message "%d" (length
                 (cl-delete-duplicates
                  (seq-filter #'markerp (flatten-tree (copy-tree buffer-undo-list)))
                  :test #'eq))))
#+end_src

To reproduce the problem, open a fresh emacs -Q, and in *scratch*,
something like this should do it:

"C-5 C-0 a, RET, C-SPC, C-p, C-SPC, C-n, M-w,
C-y, C-y, C-y";

this recipe is by Yuan Fu, who first reported the problem in emacs-help,
and who is CC'd.  Then he calls the above command and gets a number much
larger than 1.

I can reproduce the problem without copy-and-paste, I just hold down the
"a" key and insert some random space chars in between, then undo
everything.  Sometimes I need to repeat once or twice to get a number
larger than "1", but very soon I see numbers like "40" which definitely
look pathological.  For me the appearance of the issue seems to behave a
bit randomly.


Thanks in advance,

Michael.



In GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-03-03 built on drachen
Repository revision: b28b8d83ac882415555fe02b73a26542c9fca781
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix





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

end of thread, other threads:[~2022-06-20 13:56 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-03 22:45 bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list Michael Heerdegen
2021-03-04  8:35 ` martin rudalics
2021-03-04 16:40   ` Michael Heerdegen
2021-03-04 17:20     ` martin rudalics
2021-03-04 18:35       ` Michael Heerdegen
2021-03-05  9:11         ` martin rudalics
2021-03-05  9:50           ` martin rudalics
2021-03-06  0:51             ` Michael Heerdegen
2021-03-06  7:48               ` Eli Zaretskii
2021-03-07  2:45                 ` Michael Heerdegen
2021-03-06  8:40               ` martin rudalics
2021-03-07  2:40                 ` Michael Heerdegen
2021-03-08  4:00               ` Michael Heerdegen
2021-03-08  8:26                 ` martin rudalics
2021-03-09  2:04                   ` Michael Heerdegen
2021-03-09  2:20                     ` Michael Heerdegen
2022-06-20  0:04                       ` Lars Ingebrigtsen
2022-06-20 13:56                         ` Michael Heerdegen
2021-03-09  8:10                     ` martin rudalics
2021-03-10  2:17                       ` Michael Heerdegen
2021-03-10  5:49                     ` Richard Stallman
2021-03-09  6:19                 ` Richard Stallman
2021-03-10  2:22                   ` Michael Heerdegen

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