From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74829 Path: news.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.gnus.general Subject: Re: nnir-run-gmane search broken Date: Tue, 07 Dec 2010 08:20:43 -0500 Message-ID: <87fwu9k9ck.fsf@andy.bu.edu> References: <87vd36p6mo.fsf@fastmail.fm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291728101 20019 80.91.229.12 (7 Dec 2010 13:21:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2010 13:21:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23185@lists.math.uh.edu Tue Dec 07 14:21:37 2010 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 1PPxU2-0004vV-S9 for ding-account@gmane.org; Tue, 07 Dec 2010 14:21:31 +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 1PPxTb-0003ck-4N; Tue, 07 Dec 2010 07:21:03 -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 1PPxTZ-0003cT-7A for ding@lists.math.uh.edu; Tue, 07 Dec 2010 07:21:01 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PPxTT-0003Ok-PQ for ding@lists.math.uh.edu; Tue, 07 Dec 2010 07:21:01 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PPxTT-0002Cx-00 for ; Tue, 07 Dec 2010 14:20:55 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PPxTS-0004eC-Ps for ding@gnus.org; Tue, 07 Dec 2010 14:20:54 +0100 Original-Received: from rain.gmane.org ([80.91.229.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Dec 2010 14:20:54 +0100 Original-Received: from cohen by rain.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Dec 2010 14:20:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Z6CYhvKBET2Tk5+DCLjlBMmB7AU= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74829 Archived-At: >>>>> "Robert" == Robert Pluim writes: Robert> Matt Lundin writes: >> Commit 37a6bcd4423177ae79be2f6ac5b8f8ea4829aca7 broke nnir >> searches on my gmane groups. I surmise this is because the >> nntp-address that nnir looks for is not always present in the >> select method. My gnus-select-method looks like this: >> >> (setq gnus-select-method '(nntp "news.gmane.org")) >> >> As a result, line 1383 in nnir.el... >> >> (cadr (assoc 'nntp-address (cddr (gnus-server-to-method >> "nntp:news.gmane.org")))) >> >> ...evaluates to nil, because... >> >> (gnus-server-to-method "nntp:news.gmane.org") >> >> ...evaluates simply to... >> >> (nntp "news.gmane.org") Ugh. Previously I just checked whether the server name had gmane in it. But this isn't great since someone might have the string "gmane" in their own server that isn't really news.gmane.org (why? I have no idea, but people are funny that way). So I thought it would be safer to test the 'nntp-address. But you don't have the address set, which is the cause of the failure. Several options here: 1. Require the presence of 'nntp-address in the server definition (and nnir-run-gmane could warn if this variable is not present and suggest adding it). This is probably the "right" solution, but requires work on the part of the user. 2. Turn off checking altogether. This would have the undesired effect of making an http connection to search.gmane.org when searching on non-gmane groups. Nothing really bad happens since no search results will be found, but its a waste of a network roundtrip and of resources on search.gmane.org. I don't like it. 3. A compromise: go back to the crappy test of gmane in the server name. Most of the time this will DTRT except when a user has the string "gmane" in some server that isn't really news.gmane.org (or snews.gmane.org). This has the defects of 2, but only in rare cases. I'll push 3 right now, but if anyone prefers something else let me know. Andy