From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/77251 Path: news.gmane.org!not-for-mail From: egallego@babel.ls.fi.upm.es (Emilio =?utf-8?Q?Jes=C3=BAs?= Gallego Arias) Newsgroups: gmane.emacs.gnus.general Subject: gnus-message-archive-method and group aliases Was: Re: [BUG?] kill group state is not saved for nnimap servers. Date: Thu, 24 Feb 2011 03:10:18 +0100 Organization: TKE Message-ID: <87ei6yfaid.fsf@babel.ls.fi.upm.es> References: <878vxffqi5.fsf@babel.ls.fi.upm.es> <87y65e8brb.fsf@gnus.org> <87r5azwljn.fsf@babel.ls.fi.upm.es> <878vx73zav.fsf@gnus.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1298513463 5181 80.91.229.12 (24 Feb 2011 02:11:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Feb 2011 02:11:03 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M25580@lists.math.uh.edu Thu Feb 24 03:10:56 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PsQfN-00034C-9O for ding-account@gmane.org; Thu, 24 Feb 2011 03:10:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PsQfF-0007yX-17; Wed, 23 Feb 2011 20:10:45 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PsQfD-0007yA-1r for ding@lists.math.uh.edu; Wed, 23 Feb 2011 20:10:43 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PsQf8-00052P-42 for ding@lists.math.uh.edu; Wed, 23 Feb 2011 20:10:42 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PsQf5-0005aC-V6 for ding@gnus.org; Thu, 24 Feb 2011 03:10:35 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PsQf5-0002t1-NP for ding@gnus.org; Thu, 24 Feb 2011 03:10:35 +0100 Original-Received: from 151.red-79-146-195.dynamicip.rima-tde.net ([79.146.195.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Feb 2011 03:10:35 +0100 Original-Received: from egallego by 151.red-79-146-195.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Feb 2011 03:10:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 104 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 151.red-79-146-195.dynamicip.rima-tde.net X-Url: https://babel.ls.fi.upm.es/~egallego/ User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:VpSNPHTCq8UJNdfGZ7Lyjizh4sg= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:77251 Archived-At: Lars Ingebrigtsen writes: > egallego@babel.ls.fi.upm.es (Emilio Jesús Gallego Arias) writes: > >> No I've set gnus-save-killed-list to t and almost all of the nnimap >> groups I kill are remembered. But some groups re-appear after killing >> them. >> >> gnus-killed-list doesn't contain those groups. > > I'm unable to reproduce this. If I kill a nnimap group, then > `gnus-killed-list' contains that group. In what circumstances doesn't > this happen? Those are my relevant settings: (setq gnus-save-newsrc-file nil) (setq gnus-read-newsrc-file nil) (setq gnus-save-killed-list t) ;; Was nil previously (setq gnus-check-new-newsgroups 'ask-server) (setq gnus-use-dribble-file nil) (setq gnus-message-archive-method '(nnimap "babel")) (setq gnus-secondary-select-methods '((nnimap "babel" (nnimap-address "babel") (nnimap-stream ssl)))) I've noticed that in my newsrc.eld file a line is saved (setq gnus-server-alist '(("archive" nnimap "babel"))) I've been debugging a little bit and found the problem why Group kills are not saved for one particular server. In short, gnus confuses nnimap methods. In gnus-group-change-level this code is never executed: (unless (gnus-group-foreign-p group) (if (= level gnus-level-zombie) (push group gnus-zombie-list) (if (= oldlevel gnus-level-killed) ;; Remove from active hashtb. (unintern group gnus-active-hashtb) ;; Don't add it into killed-list if it was killed. (push group gnus-killed-list))))) So gnus-group-foreign-p returns nil. Shocking. So investigating I found that (gnus-find-method-for-group "nnimap+babel:INBOX") is (nnimap "babel") But in gnus-secondary-method-p it is compared against a different value: (gnus-method-equal '(nnimap "babel") '(nnimap "babel" (nnimap-address "babel.ls.fi.upm.es") (nnimap-stream ssl))) which of course is nil. I guess the reason (gnus-find-method-for-group "nnimap+babel:INBOX") return (nnimap "babel") is because of confusion with the archival server, but I'm not sure. I had a look into gnus-newsrc-alist, and indeed if I kill a group and then I subscribe to it the "archive" server is stored in the info of that group. Not sure what to do, killing all the groups is a must as they contain the wrong method, but then after re-subscribing they use the "archive" method now. That will fix the remember killed groups issues, but seems incorrect. BTW, Putting the group manually in gnus-killed-list does nothing. By the way, this is another part I'm not sure how it works in nnimap (gnus-group-kill-group): > (when (numberp (gnus-group-unread group)) > (gnus-request-update-group-status group 'unsubscribe)) (gnus-group-unread group) will always returns nil. It was removed from the hash in gnus-group-change-level, so before executing this function gnus-group-unread works. Some notes: - I had (setq gnus-save-killed-list nil) in order to save speed and clutter from the newsrc.eld file. - Strange that everything used to work with gnus-save-killed-list but not now. indeed nntp works in both cases this is the weird thing. Old nnimap also worked OK. Why the group must explicitly saved as killed, if I didn't subscribe and didn't request new groups don't show it. - I have several imap servers as secondary select methods and gmane as primary. So my point is that in some sense we don't have matching behavior between nntp and nnimap. - nntp: Remembers killed groups with either value of gnus-save-killed-list. - nnimap: Doesn't remember killed groups with gnus-save-killed-list set to nil, fails to remember some when gnus-save-killed-list is set to t. Regards, Emilio