[Top][All Lists]

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

Re: Big desktop undo buffer crashes Emacs

From: Luc Teirlinck
Subject: Re: Big desktop undo buffer crashes Emacs
Date: Thu, 11 May 2006 23:25:39 -0500 (CDT)

Resending, because for some reason, I got a failure message from

Bill Wohler wrote:

   By the way, the only two desktop-related items in my .emacs are turning
   on desktop-save-mode (which is probably obvious ;-) and this:

     (run-at-time 60 300 'desktop-save "~") ;it would be better to catch HUP and
                                            ;call desktop-save before exiting

The latter was your problem.   From `(elisp)Timers':

     It is usually a bad idea for timer functions to alter buffer
  contents.  When they do, they usually should call `undo-boundary' both
  before and after changing the buffer, to separate the timer's changes
  from user commands' changes and prevent a single undo entry from
  growing to be quite large.

So it is no surprise that you accumulated such a large single undo entry.

   Right now my desktop buffer is 32 kB;

So that is approximately 32 kB every five minutes.  After eight hours,
you exceed 3M.

Anyway, my patch, or disabling undo, completely gets rid of this problem.



reply via email to

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