From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/10701 Path: main.gmane.org!not-for-mail From: Brad Howes Newsgroups: gmane.emacs.gnus.general Subject: Another gnu-demon Problem Date: 15 Apr 1997 11:10:09 -0700 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035150526 25839 80.91.224.250 (20 Oct 2002 21:48:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:48:46 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id LAA12160 for ; Tue, 15 Apr 1997 11:31:17 -0700 Original-Received: from ftpbox.mot.com (ftpbox.mot.com [129.188.136.101]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Tue, 15 Apr 1997 20:10:20 +0200 Original-Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by ftpbox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id NAA18673 for ; Tue, 15 Apr 1997 13:10:17 -0500 (CDT) Original-Received: from cssun3.corp.mot.com (cssun3.corp.mot.com [129.188.230.120]) by mothost.mot.com (8.7.6/8.6.10/MOT-3.8) with SMTP id NAA04016 for ; Tue, 15 Apr 1997 13:10:15 -0500 (CDT) Original-Received: (qmail 12500 invoked by uid 4465); 15 Apr 1997 18:10:10 -0000 Original-To: ding@ifi.uio.no Xref: main.gmane.org gmane.emacs.gnus.general:10701 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:10701 I've got a "stuck" handler. Its entry in gnus-demon-handler-state never gets its time entry reset from zero, so it gets called every minute. Watching gnus-demon with edebug, when `(funcall (car handler))' gets executed, something is going on so that the following `(setcar...)' stuff never does! My handler `my-reset-logs' is defined as: (defun my-reset-nndoc (group) (gnus-info-clear-data (gnus-get-info group))) (defun my-reset-logs () (my-reset-nndoc "nndoc+/home/bhowes/Mail/news.log:news.log") (my-reset-nndoc "nndoc+/home/bhowes/Mail/root.log:root.log") (my-reset-nndoc "nndoc+/home/bhowes/Mail/listproc.log:listproc.log") (my-reset-nndoc "nndoc+/home/bhowes/Mail/CSPS2.log:CSPS2.log") (my-reset-nndoc "nndoc+/home/bhowes/Mail/smtp.log:smtp.log")) Why the weird behavior with `funcall'? The following patch to gnus-demon (5.4.45) corrects the problem: *** gnus-demon.el.ori Tue Apr 15 11:00:55 1997 --- gnus-demon.el Tue Apr 15 11:01:28 1997 *************** *** 200,210 **** (t (< 0 gnus-demon-idle-time)))) ; Or just need to be idle. ;; So we call the handler. (progn ! (funcall (car handler)) ! ;; And reset the timer. (setcar (nthcdr 1 handler) (gnus-demon-time-to-step ! (nth 1 (assq (car handler) gnus-demon-handlers))))))) ;; These are only supposed to be called when Emacs is idle. ((null (setq idle (nth 2 handler))) ;; We do nothing. --- 200,211 ---- (t (< 0 gnus-demon-idle-time)))) ; Or just need to be idle. ;; So we call the handler. (progn ! ;; Reset the timer. (setcar (nthcdr 1 handler) (gnus-demon-time-to-step ! (nth 1 (assq (car handler) gnus-demon-handlers)))) ! ;; Call the handler ! (funcall (car handler))))) ;; These are only supposed to be called when Emacs is idle. ((null (setq idle (nth 2 handler))) ;; We do nothing. *************** *** 219,228 **** (and (not (memq (car handler) gnus-demon-idle-has-been-called)) (< idle gnus-demon-idle-time) (progn - (funcall (car handler)) ;; Make sure the handler won't be called once more in ;; this idle-cycle. ! (push (car handler) gnus-demon-idle-has-been-called))))))))) (defun gnus-demon-add-nocem () "Add daemonic NoCeM handling to Gnus." --- 220,229 ---- (and (not (memq (car handler) gnus-demon-idle-has-been-called)) (< idle gnus-demon-idle-time) (progn ;; Make sure the handler won't be called once more in ;; this idle-cycle. ! (push (car handler) gnus-demon-idle-has-been-called) ! (funcall (car handler)))))))))) (defun gnus-demon-add-nocem () "Add daemonic NoCeM handling to Gnus." -- Brad Howes Motorola E-Mail ID: XBH001 EMT Development SMTP E-Mail: bhowes@cssun3.corp.mot.com Motorola Corporate - MD H1780 Voice: 602 441 1522 Fax: 602 441 5455