help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A ton of marker entry in buffer-und-list


From: Yuan Fu
Subject: Re: A ton of marker entry in buffer-und-list
Date: Mon, 1 Mar 2021 12:54:35 -0500


> On Feb 28, 2021, at 7:21 PM, Michael Heerdegen <michael_heerdegen@web.de> 
> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> Hmmm, I just tried again and alas, I get the markers even without
>> winner-mode. For some reason disabling winner-mode solved it when I
>> last tested it. How strange.
> 
> Ok.
> 
> Now I used this:
> 
> #+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 get the number of different markers in `buffer-undo-list', after
> reproducing the recipe.  The answer was always "1".  Just a bunch of
> entries referring to one and the same marker.  That seems sane.
> 
> Are you able to provide a more pathological recipe?
> 

Using the same recipe, I got 18, the number of marker entries in each undo 
step. Also, even if the answer is 1, it is not ok because that shortens the 
number of undo a buffer can record by a factor of n (e.g., 18 in my case).

Yuan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]