From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: desktop.el: autosave? Date: Thu, 06 Dec 2007 00:09:24 +0100 Message-ID: <47572FA4.4080207@gmx.at> References: <8763zjfe0v.fsf@jurta.org> <87mysridxt.fsf@jurta.org> <47550419.2080503@gmx.at> <47566942.9090208@gmx.at> <87d4tk22dz.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196896184 27353 80.91.229.12 (5 Dec 2007 23:09:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 23:09:44 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 06 00:09:53 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J03NI-0002KY-M0 for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2007 00:09:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J03N1-00046Q-OA for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2007 18:09:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J03My-00043F-14 for emacs-devel@gnu.org; Wed, 05 Dec 2007 18:09:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J03Mw-000423-Pj for emacs-devel@gnu.org; Wed, 05 Dec 2007 18:09:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J03Mw-00041s-ML for emacs-devel@gnu.org; Wed, 05 Dec 2007 18:09:30 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1J03Mw-0008I3-0h for emacs-devel@gnu.org; Wed, 05 Dec 2007 18:09:30 -0500 Original-Received: (qmail invoked by alias); 05 Dec 2007 23:09:28 -0000 Original-Received: from N812P022.adsl.highway.telekom.at (EHLO [62.47.45.118]) [62.47.45.118] by mail.gmx.net (mp036) with SMTP; 06 Dec 2007 00:09:28 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+wZ0ZJpzmwYwImAZxyHDWVcg8d8RISs5qzG57Aoz Ujtgry7Hi+Y000 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <87d4tk22dz.fsf@jurta.org> X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84759 Archived-At: >>Wouldn't it be sufficient to have one idle timer which triggers >>auto-saving only if some timeout has elapsed since the last auto-save >>of the desktop? > > > It seems this is not possible with idle timers because they use timeout > elapsed since the last user input, not the last time they run. Ahh no. I meant using an extra variable which records the last autosave date. Whenever the routine triggered by the idle timer detects that the period (one hour ...) has elapsed (by comparing that variable's value with the present time) it does autosave and reset that variable. This would only fail when an idle time starts before the autosave timeout has expired and terminates long after that.