From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/12842 Path: main.gmane.org!not-for-mail From: Harald Meland Newsgroups: gmane.emacs.gnus.general Subject: Re: Idleness Date: 17 Nov 1997 16:32:48 +0100 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035152309 5987 80.91.224.250 (20 Oct 2002 22:18:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:18:29 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id JAA06926 for ; Mon, 17 Nov 1997 09:11:43 -0800 Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA28780 for ; Mon, 17 Nov 1997 11:12:09 -0600 (CST) Original-Received: from pat.uio.no (6089@pat.uio.no [129.240.130.16]) by ifi.uio.no (8.8.7/8.8.7/ifi0.2) with SMTP id QAA13454 for ; Mon, 17 Nov 1997 16:32:57 +0100 (MET) Original-Received: from octarine.uio.no (actually octarine.uio.no [129.240.186.25]) by pat.uio.no with SMTP (PP); Mon, 17 Nov 1997 16:32:49 +0100 Original-Received: by octarine.uio.no ; Mon, 17 Nov 1997 16:32:49 +0100 (MET) Original-To: ding@ifi.uio.no In-Reply-To: Hrvoje Niksic's message of "16 Nov 1997 03:06:59 +0100" Original-Lines: 29 X-Mailer: Quassia Gnus v0.13/Emacs 20.2 Xref: main.gmane.org gmane.emacs.gnus.general:12842 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:12842 [Hrvoje Niksic] | I noticed the code like this in gnus-util: | | (defun gnus-demon-is-idle-p () | "Whether Emacs is idle or not." | ;; We do this simply by comparing the 100 most recent keystrokes | ;; with the ones we had last time. If they are the same, one might | ;; guess that Emacs is indeed idle. This only makes sense if one | ;; calls this function seldom -- like once a minute, which is what | ;; we do here. | [...] | | Why use these hacks, instead of the standard XEmacs IS-IDLE argument | to `start-itimer', or FSFmacs `run-with-idle-timer'? Not that the | above hack doesn't work, but I just don't see the point... | | Is it a compatibility thing? No, I guess it has to do with the gnus-demon functionality of running a function every N minutes _after_ emacs has been idle for X minutes. `run-with-idle-timer' will only let you run a function every time Emacs has been idle for SECS seconds, so using this would merely move the hacking elsewhere, not remove it. I don't know if the way XEmacs provides idle timers would make the removal of the hack easy. -- Harald