Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: "Håkon Stordahl" <haastord@online.no>
Cc: bugs@gnus.org, ding@gnus.org
Subject: Re: Problem with mail-source-report-new-mail
Date: Wed, 05 Dec 2007 21:47:58 +0100	[thread overview]
Message-ID: <v9odd4uav5.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87mysp5cfk.fsf@haakonst1.dyndns.org> (=?iso-8859-1?Q?=22H=E5?= =?iso-8859-1?Q?kon?= Stordahl"'s message of "Wed, 05 Dec 2007 17:33:19 +0100")

[ 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/



       reply	other threads:[~2007-12-05 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87mysp5cfk.fsf@haakonst1.dyndns.org>
2007-12-05 20:47 ` Reiner Steib [this message]
2007-12-06  3:09   ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9odd4uav5.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=bugs@gnus.org \
    --cc=ding@gnus.org \
    --cc=haastord@online.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).