Elias Oltmanns wrote: > Hi again, > > currently, after I have downloaded articles from a server and switched > into unplugged operation, aell agentised servers remains open in a > sense, i.e., when I enter a group served by any of those servers, gnus > tries to connect to the server and if it succeeds, treats it as any > other open server. Only if the connection fails, the server is switched > offline. I wonder whether this really is a desirable behaviour. > Personally, I clearly prefer gnus to behave "unplugged" as it tells me > in the mode line. If I really want to open one of those servers, I can > still do so explicitly in the server buffer. Also, the current behaviour > should be rather annoying in an dial-on-demand setup. Shouldn't > gnus-agent-close-connections switch all agentised servers offline? As it turns out, the problem is a somewhat more subtle one. Mind you, I still think that it would be a sensible idea to switch agentised servers offline in gnus-agent-close-connections, if only to make sure that they show up correctly (that is, with status flag "(offline)") in the server buffer right after switching to unplugged mode. However, the behaviour I described in my original mail is due to another problem. As a matter of fact, gnus currently doesn't reliably recognise agentised servers, or, more precisely, sometimes a method is improperly considered not covered by the agent. The problem is this: gnus-agent-covered-methods, sadly, doesn't store methods but only server names. Well, this approach requires the notion of a canonical server name. For that purpose, gnus-server-named-server determines the name of a server by feeding its method to gnus-method-to-server and so should gnus-agent-method-p. Unfortunately, there is a flaw in this concept since gnus-method-to-server consults gnus-server-method-cache and returns the first entry matching the method. Supposing gnus-server-alist contains an entry like this: ("provider" nnimap "provider" (nnimap-server-address "imap.provider.com") then gnus-server-method-cache will eventually, depending on the sequence of events, contain entries like this: (... ("nnimap:provider" nnimap "provider" (nnimap-server-address "imap.provider.com") ... ("provider" nnimap "provider" (nnimap-server-address "imap.provider.com") ...) So, the result of gnus-method-to-server is not predictable for any given method if it is in the cache. For these reasons I suggest to apply the patch attached below. Actually, I'd prefer to have gnus-agent-covered-methods store methods rather than servers, but I suppose that this will introduce more problems with existing installations upgrading to the next release of gnus. Regards, Elias Applies to current trunk: