Gnus development mailing list
 help / color / mirror / Atom feed
From: Andrew Cohen <cohen@andy.bu.edu>
To: ding@gnus.org
Subject: Re: nnir-run-gmane search broken
Date: Tue, 07 Dec 2010 08:20:43 -0500	[thread overview]
Message-ID: <87fwu9k9ck.fsf@andy.bu.edu> (raw)
In-Reply-To: <pkn4oapdhcp.fsf@invalid.com>

>>>>> "Robert" == Robert Pluim <rpluim@gmail.com> writes:

    Robert> Matt Lundin <mdl@imapmail.org> 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





  reply	other threads:[~2010-12-07 13:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07  4:08 Matt Lundin
2010-12-07 10:09 ` Robert Pluim
2010-12-07 13:20   ` Andrew Cohen [this message]
2010-12-08 19:17     ` Matt Lundin
2010-12-08 19:27       ` Matt Lundin
2010-12-10 15:01         ` Matt Lundin

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=87fwu9k9ck.fsf@andy.bu.edu \
    --to=cohen@andy.bu.edu \
    --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).