all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* About idle timers
@ 2013-04-04  7:59 Xue Fuqiao
  2013-04-04  9:07 ` Phillip Lord
  0 siblings, 1 reply; 3+ messages in thread
From: Xue Fuqiao @ 2013-04-04  7:59 UTC (permalink / raw)
  To: help-gnu-emacs

In (info "(elisp) Idle Timers"):

  An idle timer set for 600 seconds will run when ten minutes have
  elapsed since the last user command was finished, even if subprocess
  output has been accepted thousands of times within those ten minutes,
  and even if there have been garbage collections and autosaves.

Will the idle timer run if Emacs isn't idle after 600 seconds?

-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About idle timers
  2013-04-04  7:59 About idle timers Xue Fuqiao
@ 2013-04-04  9:07 ` Phillip Lord
  2013-04-04 11:08   ` Xue Fuqiao
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Lord @ 2013-04-04  9:07 UTC (permalink / raw)
  To: Xue Fuqiao; +Cc: help-gnu-emacs

Xue Fuqiao <xfq.free@gmail.com> writes:
> In (info "(elisp) Idle Timers"):
>
>   An idle timer set for 600 seconds will run when ten minutes have
>   elapsed since the last user command was finished, even if subprocess
>   output has been accepted thousands of times within those ten minutes,
>   and even if there have been garbage collections and autosaves.
>
> Will the idle timer run if Emacs isn't idle after 600 seconds?

No. Emacs has to be idle for at least 600 seconds or the idle timer will
not run. Idle timers are very useful for running things "in the
background" that don't interrupt the user. You do have to use them
carefully though, because once the idle timer starts to run, it will
continue to run to completion. So, if you want to do anything
computational intensive, you need to check constantly to see if their is
user input pending. I normally do this with "sit-for".

Phil



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About idle timers
  2013-04-04  9:07 ` Phillip Lord
@ 2013-04-04 11:08   ` Xue Fuqiao
  0 siblings, 0 replies; 3+ messages in thread
From: Xue Fuqiao @ 2013-04-04 11:08 UTC (permalink / raw)
  To: Phillip Lord; +Cc: help-gnu-emacs

On Thu, 04 Apr 2013 10:07:55 +0100
phillip.lord@newcastle.ac.uk (Phillip Lord) wrote:

> Xue Fuqiao <xfq.free@gmail.com> writes:
> > In (info "(elisp) Idle Timers"):
> >   An idle timer set for 600 seconds will run when ten minutes have
> >   elapsed since the last user command was finished, even if subprocess
> >   output has been accepted thousands of times within those ten minutes,
> >   and even if there have been garbage collections and autosaves.
> > Will the idle timer run if Emacs isn't idle after 600 seconds?

> No. Emacs has to be idle for at least 600 seconds or the idle timer will
> not run. Idle timers are very useful for running things "in the
> background" that don't interrupt the user. You do have to use them
> carefully though, because once the idle timer starts to run, it will
> continue to run to completion. So, if you want to do anything
> computational intensive, you need to check constantly to see if their is
> user input pending.

Ah, I see, thank you.

-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-04 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04  7:59 About idle timers Xue Fuqiao
2013-04-04  9:07 ` Phillip Lord
2013-04-04 11:08   ` Xue Fuqiao

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.