* Another gnu-demon Problem
@ 1997-04-15 18:10 Brad Howes
1997-04-15 22:03 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Brad Howes @ 1997-04-15 18:10 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Another gnu-demon Problem
1997-04-15 18:10 Another gnu-demon Problem Brad Howes
@ 1997-04-15 22:03 ` Lars Magne Ingebrigtsen
1997-04-15 23:53 ` Brad Howes
0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-04-15 22:03 UTC (permalink / raw)
Brad Howes <bhowes@cssun3.corp.mot.com> writes:
> 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!
Weird. Perhaps something is bugging out, but is being caught and
ignored? That could explain why the execution stops.
I don't really know whether your fix (reversing the statements) is a
good idea or not. Perhaps just slapping an `ignore-errors' around the
calls would be better...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Another gnu-demon Problem
1997-04-15 22:03 ` Lars Magne Ingebrigtsen
@ 1997-04-15 23:53 ` Brad Howes
0 siblings, 0 replies; 3+ messages in thread
From: Brad Howes @ 1997-04-15 23:53 UTC (permalink / raw)
>>>> Peals of wisdom from 'Lars Magne Ingebrigtsen (larsi@gnus.org)':
LMI> Brad Howes <bhowes@cssun3.corp.mot.com> writes:
>> I've got a "stuck" handler...
[snip]
LMI> Weird. Perhaps something is bugging out, but is being caught and
LMI> ignored? That could explain why the execution stops.
Bingo. Bad arg to `gnus-get-info'.
LMI> I don't really know whether your fix (reversing the statements) is a
LMI> good idea or not. Perhaps just slapping an `ignore-errors' around the
LMI> calls would be better...
Ignore my patch... thanks!
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-04-15 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-15 18:10 Another gnu-demon Problem Brad Howes
1997-04-15 22:03 ` Lars Magne Ingebrigtsen
1997-04-15 23:53 ` Brad Howes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).