[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop.el: autosave?
From: |
Juri Linkov |
Subject: |
Re: desktop.el: autosave? |
Date: |
Thu, 06 Dec 2007 01:41:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
>>>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.
Yes, this is not a reliable solution since an idle timer may fail to run
at the requested time. I think your first idea is better.
I wonder why standard timers don't do something like that: run a function
after a long timeout (e.g. several minutes) but only if Emacs is idle for
a few seconds. This looks like an useful behavior.
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: desktop.el: autosave?, Richard Stallman, 2007/12/01
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/03
- Re: desktop.el: autosave?, martin rudalics, 2007/12/04
- Re: desktop.el: autosave?, Richard Stallman, 2007/12/04
- Re: desktop.el: autosave?, martin rudalics, 2007/12/05
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/05
- Re: desktop.el: autosave?, martin rudalics, 2007/12/05
- Re: desktop.el: autosave?,
Juri Linkov <=
- Re: desktop.el: autosave?, Richard Stallman, 2007/12/06
- Re: desktop.el: autosave?, Richard Stallman, 2007/12/05
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/06
Re: desktop.el: autosave?, Richard Stallman, 2007/12/04
Re: desktop.el: autosave?, Reuben Thomas, 2007/12/06
- Re: desktop.el: autosave?, tomas, 2007/12/06
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/06
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/06
- Re: desktop.el: autosave?, Reuben Thomas, 2007/12/06
- Re: desktop.el: autosave?, Juri Linkov, 2007/12/06