Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: kai.grossjohann@gmx.net (Kai Großjohann)
Subject: Re: Semi-automatical update of article count in nnfolder?
Date: Sun, 20 Apr 2003 16:43:41 +0200	[thread overview]
Message-ID: <8465p9dyaq.fsf@lucy.is.informatik.uni-duisburg.de> (raw)
In-Reply-To: <ilur881pcf3.fsf@latte.josefsson.org>

Simon Josefsson <jas@extundo.com> writes:

> kai.grossjohann@gmx.net (Kai Großjohann) writes:
>
>> How does nnimap do it?  (I mean where is the entry point into the
>> code where I need to start reading?)
>
> (Warning: This code is so ugly it may make you go blind.)
>
> gnus-fixup-nnimap-unread-after-getting-new-news is invoked via
> gnus-setup-news-hook, and looks like:

(Why is it called "after-getting-new-news" but invoked from
"setup-news-hook" instead of "after-getting-new-news-hook"?)

> (defun gnus-fixup-nnimap-unread-after-getting-new-news ()
>   (let (server group info)
>     (mapatoms
>      (lambda (sym)
>        (when (and (setq group (symbol-name sym))
> 		  (gnus-group-entry group)
> 		  (setq info (symbol-value sym)))
> 	 (gnus-sethash group (cons (nth 2 info) (cdr (gnus-group-entry group)))
> 		       gnus-newsrc-hashtb)))
>      (if (boundp 'nnimap-mailbox-info)
> 	 (symbol-value 'nnimap-mailbox-info)
>        (make-vector 1 0)))))
>
> I.e., it iterates through all nnimap groups and forces the active info
> to be what the variable nnimap-mailbox-info says, which is updated by
> nnimap.

Well...  How about making a new backend function
nnchoke-request-active-info, the corresponding
gnus-request-active-info front-end function, and then the
getting-new-news code looks whether the backends support that
function, and if so, does the above?

That would still be rather ugly, but it would be generalized to other
backends.

What do you think?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)


      reply	other threads:[~2003-04-20 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <hdd8yuc17vo.fsf@bacchus.pvv.ntnu.no>
     [not found] ` <84ades6qxt.fsf@lucy.is.informatik.uni-duisburg.de>
     [not found]   ` <iluvfxetf9t.fsf@latte.josefsson.org>
2003-04-17  6:10     ` Kai Großjohann
2003-04-17 11:54       ` Simon Josefsson
2003-04-20 14:43         ` Kai Großjohann [this message]

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=8465p9dyaq.fsf@lucy.is.informatik.uni-duisburg.de \
    --to=kai.grossjohann@gmx.net \
    /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).