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: Sat, 27 Apr 2013 23:57:15 +0300 Organization: JURTA Message-ID: <87ehdv1ync.fsf@mail.jurta.org> References: <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> <87k3oaswbl.fsf@mail.jurta.org> <87k3o9v5bf.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367096261 13185 80.91.229.3 (27 Apr 2013 20:57:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Apr 2013 20:57:41 +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 Sat Apr 27 22:57:45 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 1UWCBf-0000m6-Hf for ged-emacs-devel@m.gmane.org; Sat, 27 Apr 2013 22:57:39 +0200 Original-Received: from localhost ([::1]:41924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWCBf-0007Pb-92 for ged-emacs-devel@m.gmane.org; Sat, 27 Apr 2013 16:57:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWCBc-0007PW-Ma for emacs-devel@gnu.org; Sat, 27 Apr 2013 16:57:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWCBb-0007CJ-RH for emacs-devel@gnu.org; Sat, 27 Apr 2013 16:57:36 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:35271 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWCBb-0007C7-LX for emacs-devel@gnu.org; Sat, 27 Apr 2013 16:57:35 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id CEA09258B9E91C; Sat, 27 Apr 2013 13:57:32 -0700 (PDT) In-Reply-To: (Reuben Thomas's message of "Thu, 11 Apr 2013 12:04:38 +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:159188 Archived-At: > I suggest: > > Reset the auto-save timer. > Cancel any previous timer. When `desktop-auto-save-timeout' is a positive > integer, start a new timer to call `desktop-auto-save' in that many seconds. Thanks, your docstring is much better. After testing for some more time I see no problems with `run-with-timer'. If someone will find it problematic then another option could be added with a name like `desktop-auto-save-idle-timeout' to use `run-with-idle-timer' in addition to `run-with-timer'.