emacs-devel
[Top][All Lists]
Advanced

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

Re: disabling undo boundaries


From: Phillip Lord
Subject: Re: disabling undo boundaries
Date: Wed, 12 Aug 2015 23:34:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> My own feeling is that undo-boundaries should be the task of the mode
>> author, with sensible default behaviour (like the current one) for
>> user-centric modes (i.e. non process buffers).
>
> In 99.9% of the cases, authors don't want to know about undo boundaries,
> they should "just work", so the default is very important.

I would agree, but I still need to something that breaks so I can check
it is all working.

The closest I have got so far is with cider interaction mode (i.e. the
repl). I managed to get this to crash out with the "excessively large
undo this is probably a bug" error message after my patch, running

(doall (map #(println %)) (range 100000))

However, without my patch, emacs just runs to hang as it gets into a
tight GC cycle, presumably as the buffer gets enormous, so in fact this
really is a bug (i.e. the buffer is never truncated), and my patch
improves things.

Implementing "add an undo-boundary if there isn't one in any buffer with
a big buffer-undo-list" I can certainly do. Any reason to not do this on
a timer (i.e. why tie it to the command cycle)? In lisp? This is a ten
minute job. In C, it will take longer.

Phil



reply via email to

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