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.el: autosave? Date: Wed, 10 Apr 2013 10:05:45 +0300 Organization: JURTA Message-ID: <87k3oaswbl.fsf@mail.jurta.org> References: <8763zjfe0v.fsf@jurta.org> <87mysridxt.fsf@jurta.org> <20071206153806.GA20731@www.trapp.net> <87d4tjbh0g.fsf@jurta.org> <87abon5q1f.fsf@jurta.org> <87lk835rb7.fsf@jurta.org> <87ejdu6rna.fsf@jurta.org> <87mysi3wx7.fsf@jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365577688 32591 80.91.229.3 (10 Apr 2013 07:08:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Apr 2013 07:08:08 +0000 (UTC) Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Reuben Thomas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 10 09:08:12 2013 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 1UPp8d-0005SC-SZ for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2013 09:08:11 +0200 Original-Received: from localhost ([::1]:43933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPp8d-0005cc-DX for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2013 03:08:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPp8a-0005cS-HI for emacs-devel@gnu.org; Wed, 10 Apr 2013 03:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPp8Z-0002zk-Es for emacs-devel@gnu.org; Wed, 10 Apr 2013 03:08:08 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:35402 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPp8Z-0002zW-90 for emacs-devel@gnu.org; Wed, 10 Apr 2013 03:08:07 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 4CAF7258B92960; Wed, 10 Apr 2013 00:08:04 -0700 (PDT) In-Reply-To: (Reuben Thomas's message of "Wed, 10 Apr 2013 02:36:35 +0100") 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.218.105 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:158817 Archived-At: > I've been happily using essentially the above code (mostly Juri's, with a > handful of lines by me) since this thread went quiet over five years ago. The problem is that the time interval to run auto-save-hook is not configurable exclusively for desktop mode. If a user wants to auto-save the desktop less often than to auto-save files there is no way to do this. OTOH, I like the simplicity of the auto-saving feature in savehist that uses just one option `savehist-autosave-interval' to configure the interval between autosaves, or nil to disable timer-based auto-saving. Savehist uses `run-with-timer'. Why not to do the same in desktop mode? What are the problems with using `run-with-timer'?