From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: desktop-auto-save-timeout Date: Thu, 05 Jun 2014 01:49:15 +0300 Organization: JURTA Message-ID: <878upcffys.fsf@mail.jurta.org> References: <838upkh29q.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401922711 3457 80.91.229.3 (4 Jun 2014 22:58:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Jun 2014 22:58:31 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 05 00:58:24 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WsK5A-0003JD-L2 for ged-emacs-devel@m.gmane.org; Thu, 05 Jun 2014 00:54:56 +0200 Original-Received: from localhost ([::1]:37377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsK5A-00024o-9q for ged-emacs-devel@m.gmane.org; Wed, 04 Jun 2014 18:54:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsK4z-00020m-Oz for emacs-devel@gnu.org; Wed, 04 Jun 2014 18:54:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsK4s-0002ur-7G for emacs-devel@gnu.org; Wed, 04 Jun 2014 18:54:45 -0400 Original-Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:50546 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsK4k-0002tv-6H; Wed, 04 Jun 2014 18:54:30 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 8A9B136EA6F81A; Wed, 4 Jun 2014 15:54:27 -0700 (PDT) In-Reply-To: <838upkh29q.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 May 2014 21:24:01 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 69.163.216.107 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172345 Archived-At: > 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.