[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash TMOUT for emacs
From: |
Kevin Rodgers |
Subject: |
Re: bash TMOUT for emacs |
Date: |
Mon, 20 Dec 2004 09:43:23 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Dan Jacobson wrote:
> Gentlemen, at the gala festival I have left emacs running and
> forgotten on a terminal that I can't even remember what room is in.
> Well, if emacs had a timeout setting, like bash's TMOUT, then I
> wouldn't need to worry that some perpetrator could molest my files.
>
> TMOUT If set to a value greater than zero, the value is
> interpreted as the number of seconds to wait for
> input after issuing the primary prompt. Bash ter-
> minates after waiting for that number of seconds if
> input does not arrive.
Does this work?
(when (getenv "TMOUT")
(run-with-idle-timer (getenv "TMOUT") nil 'kill-emacs))
--
Kevin Rodgers