[Top][All Lists]

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

Re: desktop-auto-save-timeout

From: Juri Linkov
Subject: Re: desktop-auto-save-timeout
Date: Thu, 05 Jun 2014 01:49:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> I wonder if the default value of this option (equal to
> auto-save-timeout) is TRT.  The latter is used to auto-save our edits,
> which are by definition precious, so people are likely to customize it
> to small values (I have it at 15 sec).  By contrast, important desktop
> changes are relatively rare, and even if some of them are lost, it's
> not a disaster, at least not in general.
> I've run Emacs 24.3.9x with the default value (which for me means
> 15sec) for some time, and the results are unpleasant: Emacs becomes
> sluggish in its response whenever you look at the screen for more than
> the timeout without typing anything.  E.g., start an I-search, then
> make a pause to look at the text you found, then type C-s to continue
> the search -- it takes a few seconds for Emacs to respond, probably
> because the desktop's idle timer invokes desktop-save, which needs to
> collect a non-trivial amount of data in a temp buffer, then run that
> buffer through md5.  Very annoying.

I realized now that the right way to implement the desktop auto-saving
is to activate an idle timer only on changes in the window configuration
by window-configuration-change-hook.

The desktop file is mostly about remembering a list of buffers and
windows.  There is no point in auto-saving each time point moves.
This is what web browsers do by auto-saving a list of tabs
only when you open/close a tab.

reply via email to

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