From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list Date: Wed, 03 Mar 2021 23:45:29 +0100 Message-ID: <87o8fzn9fa.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14285"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Yuan Fu To: 46908@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 03 23:46:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHaFx-0003Ya-FV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 23:46:13 +0100 Original-Received: from localhost ([::1]:39778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHaFw-0001Nc-Ez for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 17:46:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHaFn-0001Ke-6k for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 17:46:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHaFm-0002G8-Vk for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 17:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHaFm-0007jS-UW for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 17:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Mar 2021 22:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46908 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161481153829667 (code B ref -1); Wed, 03 Mar 2021 22:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Mar 2021 22:45:38 +0000 Original-Received: from localhost ([127.0.0.1]:57172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHaFN-0007iQ-J5 for submit@debbugs.gnu.org; Wed, 03 Mar 2021 17:45:38 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:40766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHaFL-0007iI-TD for submit@debbugs.gnu.org; Wed, 03 Mar 2021 17:45:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHaFL-000151-Ls for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 17:45:35 -0500 Original-Received: from mout.web.de ([212.227.17.11]:59483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHaFI-00026o-NS for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 17:45:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1614811530; bh=+41TuOGHm6jO7NtTfXlMEIGaIVc7sTn14gLu9C+I9sA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=ikAV+7XZxx4NO+6qOM6bgrR46d5tu06GYzqCCAzH1DytncuwDxL8XW+sAfVcpD3px ElPXGMIju7Ef0Es0joD/Xe1PtvYkr5mEdUv+PqYbrH4znQKbIpRJZBpl2P/t0UT9ho +oTHUaaNa6NLvd/zGyE9DQGUcK41fUdr7g6+UQd8= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.220.60]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M6YJ1-1lORs30XN3-00780M; Wed, 03 Mar 2021 23:45:30 +0100 X-Provags-ID: V03:K1:Ak4XQUR28jo5NwcbeGGoBjU6hlF2goedrPOXsV7kqT2tcKS4DVy zkp0+qzVJXnj2g/aCfK/Arj3lGg8y220wa5DdcwIugh8di5blCIfY8kdtZ8zk8ne6ZcGj50 3vwzA3Zo0so/u5Km42C1XY+HETqpMmTzGOoG7SXEhSQqwaPJQKywvgN7pg5gNT5Ps63dIrI 9SN0fQci0fRzeoLvjgfeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:qrAoo49Eth4=:jffLABrbcEqMgyR6dH1Oaa qBF/hDszREzanbswuRuCbAKpEYUSJgRyTiu6S5aE9oFCm09nYV0dDhDhHh0hozHtNKtdAFs32 k9EETNfP9GdNIvd3/ODdY7jKWTMc5UZGOtb4zX6FuEvG7xVuhGYVNN1QQOx8wXJqJO+M7IDvX kAuk40eoCGjzv7X6I461aUBW8AYSQTKCk2Tc/bz+jLVAN/UksblTgd7YHFEaiw3YypgXEfX9k bYrVQFcCQnkS1lKcOWX6k0jlGWhXxscFJG/wM5iF2UibEcKc0buyyjFXQ/f/758lThGUdzXP3 CaXCt5suNs7+VCNkYOCeS1AMK+/B+YZccdaOtp+ZHsuhro3FLTZH4ziMDUoZ6D/o5i/IpdN0j VFPVIoiCQ7KP6Yb6y25GlH/erUn3+jdeBUyjvHdVSoytuRzdTn4xssP67GC/rQ2rMY/Fvd1Zk v7IDCj5wbpAGSdnpm3KehUF7kt5a680gMGle9eW3dQ/Z6TORt77rik7wlpIAev6uRHk1ixYDP Di9O3JhHqJ6XF8arRIIb9M5IopJid7hMMfNMsWWgOmf/F3QLhhOSc66uHlQ2EWfBoCtKEeMYW QpJV7RsihMyd46oJyCihixJwTwKTRB4j/z6ExOkejAjVzc/14h15PPJ7ozIJ3B2gAEVSAeXO6 LTBYvQciaMt0jaA2OFMVZwNN/y2R2BhSd1DwndgLPCpyGVm6fgMlJLnAO5cW2RzmpoJxmMJj+ THwv+ORXr/6u7m2yACk9w74G6NZw7VvR0UL65JX/c2d4WgAVY9jkHgvlaWCVSYUOQ3PaWaR/ Received-SPF: pass client-ip=212.227.17.11; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201336 Archived-At: 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