From: egallego@babel.ls.fi.upm.es (Emilio Jesús Gallego Arias)
To: ding@gnus.org
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 [thread overview]
Message-ID: <87ei6yfaid.fsf@babel.ls.fi.upm.es> (raw)
In-Reply-To: <878vx73zav.fsf@gnus.org>
Lars Ingebrigtsen <larsi@gnus.org> 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
next prev parent reply other threads:[~2011-02-24 2:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 0:34 Emilio Jesús Gallego Arias
2011-02-17 0:37 ` Emilio Jesús Gallego Arias
2011-02-17 23:47 ` Lars Ingebrigtsen
2011-02-23 2:07 ` Emilio Jesús Gallego Arias
2011-02-23 8:55 ` Lars Ingebrigtsen
2011-02-24 2:10 ` Emilio Jesús Gallego Arias [this message]
2011-03-05 12:20 ` gnus-message-archive-method and group aliases Was: " Lars Magne Ingebrigtsen
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=87ei6yfaid.fsf@babel.ls.fi.upm.es \
--to=egallego@babel.ls.fi.upm.es \
--cc=ding@gnus.org \
/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).