From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61535 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap check for new mail in the background Date: Wed, 14 Dec 2005 15:12:21 +0100 Message-ID: References: <87irtzhs6x.fsf@ntnu.no> <83acf5f3c0.fsf@ntnu.no> <83wti8m0lr.fsf@ntnu.no> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1134569744 13627 80.91.229.2 (14 Dec 2005 14:15:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2005 14:15:44 +0000 (UTC) Original-X-From: ding-owner+m10067@lists.math.uh.edu Wed Dec 14 15:15:40 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmXNT-00032v-SE for ding-account@gmane.org; Wed, 14 Dec 2005 15:13:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EmXNP-0005HG-00; Wed, 14 Dec 2005 08:13:03 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EmXMz-0005HA-00 for ding@lists.math.uh.edu; Wed, 14 Dec 2005 08:12:37 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1EmXMx-0006we-4S for ding@lists.math.uh.edu; Wed, 14 Dec 2005 08:12:36 -0600 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EmXMs-0007AE-00 for ; Wed, 14 Dec 2005 15:12:30 +0100 Original-Received: from latte.josefsson.org (jas@yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3) with ESMTP id jBEECRsN023400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 14 Dec 2005 15:12:28 +0100 Original-To: ding@gnus.org OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:051214:ding@gnus.org::aLCM2b3DwnOT9jkH:6ibt In-Reply-To: <83wti8m0lr.fsf@ntnu.no> (Lars Tobias =?iso-8859-1?Q?B=F8rsti?= =?iso-8859-1?Q?ng's?= message of "Wed, 14 Dec 2005 11:31:12 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on yxa-iv X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on yxa.extundo.com X-Virus-Status: Clean X-MIME-Autoconverted: from 8bit to quoted-printable by yxa.extundo.com id jBEECRsN023400 X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61535 Archived-At: Lars Tobias B=F8rsting writes: > Simon Josefsson writes: > >>>>> Is it possible to do new mail checking in a separate thread that >>>>> runs in the background, so that it doesn't lock up the interface? >>>>> If not, is it hard to implement such a feature? >>>> >>>> It should be possible. Implement something run with the idle timer >>>> and iterate over all groups. The problem is in informing Gnus about >>>> the update -- there is no clean API to do that. It could be added, >>>> but I don't know how. >>> >>> Would it be possible to do what gnus-group-get-new-news-this-group >>> does when updating each modified group? >> >> (setq imap-log t) and look in the *imap-log* buffer, if you think of >> the IMAP protocol exchange. > > Actually, I was thinking of how to notify Gnus of the > changes. gnus-group-get-new-news and friends updates the group buffer, > so maybe some of that code is usable. That is the tricky question. You'll probably need to frob the internal variables directly, and perhaps also ask for a re-fresh of the group list asynchronously too, there is no complete API you can invoke. Looking at how g-g-g-n-n works is probably a good starting point.