From: Steinar Bang <sb@dod.no>
To: gmane-discuss@hawk.netfonds.no
Cc: ding@gnus.org
Subject: Re: Searching gmane groups in Gnus?
Date: Sun, 03 Jan 2010 18:00:05 +0100 [thread overview]
Message-ID: <87tyv36s4q.fsf@edwards.hjemme.lan> (raw)
In-Reply-To: <87k4vz8dph.fsf@edwards.hjemme.lan>
>>>>> Steinar Bang <sb@dod.no>:
>>>>> Reiner Steib <reinersteib+gmane@imap.cc>:
>> There is support for Gmane already. Dunno if it still working and if
>> it fits your needs.
> It still works, but it doesn't quite fill my needs. I would like it to
> automatically select gmane as the search engine, and add the group the
> cursor is standing on to the search.
Here is code bound to the (as far as I can tell) unused `G b' keys, that
will search the group under the cursor (bastardized from
gnus-group-make-web-group):
(defun gnus-group-make-gmane-search-group ()
"Create an ephemeral nnweb group containing the results of a Gmane search."
(interactive)
(require 'nnweb)
(let* ((group (message-unique-id))
(type "gmane")
(gmane-group-name (car (cdr (split-string (gnus-group-group-name) ":"))))
(search
(concat
"group:" gmane-group-name " "
(read-string
"Search string: "
(cons (or (car gnus-group-web-search-history) "") 0)
'gnus-group-web-search-history)))
(method
`(nnweb ,group (nnweb-search ,search)
(nnweb-type ,(intern type))
(nnweb-ephemeral-p t))))
(gnus-group-read-ephemeral-group
group method t
(cons (current-buffer)
(if (eq major-mode 'gnus-summary-mode) 'summary 'group)))))
(defun gmane-search-group-mode-hook ()
(define-key gnus-group-mode-map (kbd "G b")
'gnus-group-make-gmane-search-group))
(add-hook 'gnus-group-mode-hook 'gmane-search-group-mode-hook)
> Hm... if `G G' could be bound to do this on the gmane groups, it
> wouldn't really matter to me that nnweb is used rather than nnir...?
Well, it matters in two respects:
- No way of finding the thread the way the nnir results do
- Can't to followup to the group
next prev parent reply other threads:[~2010-01-03 17:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 18:49 Steinar Bang
2010-01-02 23:01 ` Andreas Seltenreich
2010-01-03 14:32 ` Steinar Bang
2010-01-02 23:07 ` Reiner Steib
2010-01-03 14:28 ` Steinar Bang
2010-01-03 17:00 ` Steinar Bang [this message]
2010-01-03 17:12 ` Steinar Bang
2010-01-07 23:08 ` Olly Betts
2010-01-03 15:34 ` search gnus via nnweb.el (was: Searching gmane groups in Gnus?) Memnon Anon
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=87tyv36s4q.fsf@edwards.hjemme.lan \
--to=sb@dod.no \
--cc=ding@gnus.org \
--cc=gmane-discuss@hawk.netfonds.no \
/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).