From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2319 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.user Subject: Re: Semi-automatical update of article count in nnfolder? Date: Thu, 17 Apr 2003 13:54:08 +0200 Message-ID: References: <84ades6qxt.fsf@lucy.is.informatik.uni-duisburg.de> <84vfxdr6wk.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1138668792 14723 80.91.229.2 (31 Jan 2006 00:53:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:53:12 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:30:30 2006 Original-Path: quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: fnatte.nada.kth.se Original-X-Trace: quimby.gnus.org 1050580577 14044 130.237.226.103 (17 Apr 2003 11:56:17 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 17 Apr 2003 11:56:17 GMT User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:BnsCATjLEBtPIQ25Erit098e88g= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2459 Original-Lines: 26 X-Gnus-Article-Number: 2459 Tue Jan 17 17:30:30 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2319 Archived-At: 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: (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.