From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: nnimap splitting Date: Thu, 10 Dec 2020 16:07:23 -0800 Message-ID: <87tustgq84.fsf@ericabrahamsen.net> References: <878sa6ehbn.fsf@russet.org.uk> <87v9dawogx.fsf@ericabrahamsen.net> <877dpq6jp2.fsf@russet.org.uk> <1d30cad3346c3d955911198146a18148@russet.org.uk> <9014e1d022c223fb63f7d503f8b298ec@russet.org.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3630"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:sZ73EjP7SFgn0qSnZsB5KFoOPos= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 11 01:09:02 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knVzZ-0000nw-6f for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 01:09:01 +0100 Original-Received: from localhost ([::1]:49942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knVzY-0004wa-8z for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 10 Dec 2020 19:09:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knVyO-0004wH-C4 for help-gnu-emacs@gnu.org; Thu, 10 Dec 2020 19:07:48 -0500 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:33022 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knVyL-00063Z-Iq for help-gnu-emacs@gnu.org; Thu, 10 Dec 2020 19:07:47 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1knVyH-0009zl-52 for help-gnu-emacs@gnu.org; Fri, 11 Dec 2020 01:07:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126235 Archived-At: phillip.lord@russet.org.uk writes: > On 2020-12-10 18:58, phillip.lord@russet.org.uk wrote: >> On 2020-12-10 18:36, Pankaj Jangid wrote: >>> Phillip Lord writes: >>> >> I think >> I am looking in the wrong place and my configuration here is not the >> issue at all. I have no idea, unfortunately, what the issue is. If >> this is supposed to work in Gnus, I think, it is getting all the >> server information from somehwere else. NOt sure where! Coincidentally, this is the subject of the talk I "gave" at Emacsconf last week! All server variables defined with defvoo (so all the nnimap-* symbols in your server config) are global variables, but the server-specific values are copied into the global variables while that server is the "current server". So you'll only see the relevant value -- the value Gnus is actually using -- if you edebug a live connection to the server. I hope that makes sense, apparently I still have trouble articulating how this works. > And this turns out to be the problem. I tried changing > secondary-select-methods to this: > > > (setq gnus-secondary-select-methods > '( > (nnimap "localhost" > ;;(nnimap-address "localhost") > ;;(nnimap-server-port 143) > (nnimap-address "i-dont-exist") > (nnimap-server-port 'random-nonsense) > ;; [...] > (nnimap-inbox "INBOX") > (nnimap-split-methods > (("temp" "^Subject: split-into-temp") > ("INBOX" ""))) > (nnml "" > (nnir-search-engine notmuch)))) > > And Gnus still works, still looks up the nnimap back end, still access > the email > despite the clearly incorrect address and server port. It doesn't > appear to be using > the information here at all. Confusing as it is using the nnml > information. I would close the connection to this imap server, edebug `nnimap-open-connection-1', re-open the server, and check out what's going on. You'll be guaranteed to see the server variables as Gnus sees them. Given your config above, I would expect nnimap-stream to be set to 'network, but I don't see how Gnus would be setting nnimap-address back to "localhost" since you gave it a value. I'm also confused.