* Re: Problem with mail-source-report-new-mail
[not found] <87mysp5cfk.fsf@haakonst1.dyndns.org>
@ 2007-12-05 20:47 ` Reiner Steib
2007-12-06 3:09 ` Katsumi Yamaoka
0 siblings, 1 reply; 2+ messages in thread
From: Reiner Steib @ 2007-12-05 20:47 UTC (permalink / raw)
To: Håkon Stordahl; +Cc: bugs, ding
[ Adding ding@gnus ... ]
On Wed, Dec 05 2007, Håkon Stordahl wrote:
> No Gnus v0.7
> GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
> of 2007-11-03 on pacem, modified by Debian
> 200 news.gmane.org InterNetNews NNRP server INN 2.4.1 ready (posting ok).
>
> When calling the function mail-source-report-new-mail to enable
> automatic mail checking, and unless display-time is enabled, the
> following error message appears in the minibuffer each time when
> checking or fetching new mail and the checking or fetching fails:
>
> Wrong type argument: arrayp, nil
>
> With debug-on-error set to t the error results in the following
> backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> display-time-event-handler()
> run-hooks(nnmail-post-get-new-mail-hook)
> nnmail-get-new-mail(nnfolder #[nil "[...]" [nnfolder-buffer-alist bufs gnus-buffer-live-p delq nnfolder-save-buffer kill-buffer nil] 4] "/home/haakonst/Mail/" nil)
> nnfolder-request-scan(nil "")
> gnus-request-scan(nil (nnfolder ""))
> gnus-read-active-file-1((nnfolder "") nil)
> gnus-read-active-file()
> gnus-group-get-new-news(nil)
> call-interactively(gnus-group-get-new-news)
>
> The problem also appears to be present in Gnus 5.11.
>
> Although the documentation string of mail-source-report-new-mail
> states that it only works when display-time is enabled, it could
> handle the opposite more gracefully. The cause of the error seems to
> be that the function display-time-event-handler gets called from the
> hook nnmail-post-get-new-mail-hook and that doesn't seem to work if
> not display-time is enabled. However, there already is a function,
> gnus-display-time-event-handler defined in the file gnus-start.el,
> which seems to be intended for handling exactly this, by calling
> display-time-event-handler only if display-time is enabled.
>
> Thus, the following simple patch against the nightly snapshot of
> 2008-11-28
Oh, could you please send us the sources? I'd be interested to see
the new features in Gnus in the future. ;-)
> suggests to substitute the references to display-time-event-handler
> in function mail-source-report-new-mail with
> gnus-display-time-event-handler instead:
>
> diff -Naur a/lisp/mail-source.el b/lisp/mail-source.el
> --- a/lisp/mail-source.el 2007-11-27 23:42:52.000000000 +0000
> +++ b/lisp/mail-source.el 2007-11-30 04:39:08.000000000 +0000
> @@ -937,11 +937,11 @@
> #'mail-source-start-idle-timer))
> ;; When you get new mail, clear "Mail" from the mode line.
> (add-hook 'nnmail-post-get-new-mail-hook
> - 'display-time-event-handler)
> + 'gnus-display-time-event-handler)
> (message "Mail check enabled"))
> (setq display-time-mail-function nil)
> (remove-hook 'nnmail-post-get-new-mail-hook
> - 'display-time-event-handler)
> + 'gnus-display-time-event-handler)
> (message "Mail check disabled"))))
>
> (defun mail-source-fetch-maildir (source callback)
I don't use timers for Gnus. Does anyone see a problem with this
patch?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 2+ messages in thread