searching articles
I would like to do a search-engine like search on a (local, gnus) mail archive. I just tried (in the directory where my mail resides) M-x grep -i -nH -e "modular" $(grep -l "testInterpolant" *) but this seems very clumsy. Any better idea? Martin ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Searching articles
When searching articles using gnus-summary-search-article-forward or backward, the search includes headers and body. Is it possible to search only the body of the articles? -- ~ ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: searching articles
Martin Rubey writes: Hi Martin, > I would like to do a search-engine like search on a (local, gnus) mail > archive. I just tried (in the directory where my mail resides) > > M-x grep -i -nH -e "modular" $(grep -l "testInterpolant" *) > > but this seems very clumsy. Any better idea? Yes, use a search engine! Currently, there are two very good competitors in that field. The first is mairix [1] and the second is notmuch [2]. The former is integrated into Gnus via the nnmairix backend that's included in Gnus and recent emacsen. The latter is very new and has an emacs interface, too, but provides no Gnus backend. But it's not too difficult to jump from a message found by notmuch to jump to that message in Gnus. I have a function for that. Whichever you choose, both should be 1000 times faster than grepping all mail. Bye, Tassilo __ [1] http://www.rpcurnow.force9.co.uk/mairix/ [2] http://notmuchmail.org/ ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: searching articles
Martin Rubey writes: > I would like to do a search-engine like search on a (local, gnus) mail > archive. I just tried (in the directory where my mail resides) > > M-x grep -i -nH -e "modular" $(grep -l "testInterpolant" *) > > but this seems very clumsy. Any better idea? M-x lgrep and for a recursive search M-x rgrep Also emacs23 ships with mairix. From the mairix manual "Mairix is a tool for indexing and searching words in locally stored mail. It was written by Richard Curnow and is licensed under the GPL." ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: searching articles
On Nov 30, 8:51 am, Martin Rubey wrote: > I would like to do a search-engine like search on a (local, gnus) mail > archive. I just tried (in the directory where my mail resides) > > M-x grep -i -nH -e "modular" $(grep -l "testInterpolant" *) > > but this seems very clumsy. Any better idea? See IncrementalIndexMail[1] page at Emacs wiki. Regards. [1] http://www.emacswiki.org/cgi-bin/wiki/IncrementalIndexMail ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: Searching articles
Richmond writes: > When searching articles using gnus-summary-search-article-forward or > backward, the search includes headers and body. Is it possible to search > only the body of the articles? I don't think so, no. But you could attack the problem a different way, with "/ b" limiting to body. It doesn't behave quite the same way, but would produce similar results... Eric ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: Searching articles
Eric Abrahamsen writes: > Richmond writes: > >> When searching articles using gnus-summary-search-article-forward or >> backward, the search includes headers and body. Is it possible to search >> only the body of the articles? > > I don't think so, no. But you could attack the problem a different way, > with "/ b" limiting to body. It doesn't behave quite the same way, but > would produce similar results... > > Eric > > That's a brilliant bit of lateral thinking. And it works. Thanks. -- ~ ___ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english
nnimap and searching articles by message-id
Hi, It turns out that the IMAP server I am using requires the message-id be stripped of the enclosing angle brackets when searching for messages like so: UID SEARCH HEADER Message-Id ".y...@foobar.com" Not sure who is not compliant here: Gnus/nnimap or the IMAP server? I found that gnus-summary-refer-article and gnus-article-refer-article could be modified to suppress the angle brackets. That doesn't seem to be the right solution however as I would think the fix needs to be made in nnimap.el instead. Can anybody suggest a proper way to resolve the problem while allowing for article referencing by message-id when reading news through nntp and email through imap? Thanks, --Peter ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: nnimap and searching articles by message-id
On Sat, Sep 19 2009, Peter wrote: > It turns out that the IMAP server I am using Which IMAP server software is it? > requires the message-id be stripped of the enclosing angle brackets > when searching for messages like so: > > UID SEARCH HEADER Message-Id ".y...@foobar.com" > > Not sure who is not compliant here: Gnus/nnimap or the IMAP server? Cc-ing the developer list. Maybe someone there knows. > I found that gnus-summary-refer-article and gnus-article-refer-article > could be modified to suppress the angle brackets. That doesn't seem to > be the right solution however as I would think the fix needs to be made in > nnimap.el instead. Can anybody suggest a proper way to resolve the > problem while allowing for article referencing by message-id when > reading news through nntp and email through imap? Here's a preliminary, untested patch. Does it work for you? --8<---cut here---start->8--- --- nnimap.el 30 Jan 2009 18:32:29 +0100 7.59 +++ nnimap.el 19 Sep 2009 11:09:02 +0200 @@ -252,6 +252,15 @@ :type 'boolean :group 'nnimap) +(defcustom nnimap-search-mid-strip-angles t ;; nil + "Strip angles around Message-ID search. + +Some non-compliant (???) IMAP servers require to strip the angles +around Message-ID when doing an UID SEARCH." + :version "23.2" ;; No Gnus 0.12 + :group 'nnimap + :type '(choice boolean)) + (defvoo nnimap-need-unselect-to-notice-new-mail t "Unselect mailboxes before looking for new mail in them. Some servers seem to need this under some circumstances.") @@ -654,7 +663,10 @@ articles) (mapcar (lambda (msgid) (imap-search -(format "HEADER Message-Id \"%s\"" msgid))) +(format "HEADER Message-Id \"%s\"" +(if nnimap-search-mid-strip-angles +(gnus-replace-in-string msgid "[<>]" "") + msgid articles (defun nnimap-group-overview-filename (group server) --8<---cut here---end--->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: nnimap and searching articles by message-id
Reiner Steib imap.cc> writes: > > It turns out that the IMAP server I am using > > Which IMAP server software is it? It is a part of Oracle Beehive collaboration suite. > > > requires the message-id be stripped of the enclosing > angle brackets > > when searching for messages like so: > > > > UID SEARCH HEADER Message-Id ".y...@foobar.com" > > > > Not sure who is not compliant here: Gnus/nnimap or the > IMAP server? > > Cc-ing the developer list. Maybe someone there > knows. It would be good to know. What do people think? A quick scan through the RFC2822 - Internet Message Format reveals the following, but I am not sure if that is enough to convince anyone. Semantically, the angle bracket characters are not part of the msg-id; the msg-id is what is contained between the two angle bracket characters. Thanks for the patch. It didn't work for what I needed (e.g. fetch the parent article) until I applied analogous changes to the other occurrence of search by message-id in nnimap.el: nnimap-request-article-part. Thanks, --Peter ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: nnimap and searching articles by message-id
--- On Sat, 9/19/09, Reiner Steib wrote: > > It turns out that the IMAP server I am using > > Which IMAP server software is it? It is a part of Oracle Beehive collaboration suite. > > > requires the message-id be stripped of the enclosing > angle brackets > > when searching for messages like so: > > > > UID SEARCH HEADER Message-Id ".y...@foobar.com" > > > > Not sure who is not compliant here: Gnus/nnimap or the > IMAP server? > > Cc-ing the developer list. Maybe someone there > knows. It would be good to know. What do people think? A quick scan through the RFC2822 - Internet Message Format reveals the following, but I am not sure if that is enough to convince anyone. Semantically, the angle bracket characters are not part of the msg-id; the msg-id is what is contained between the two angle bracket characters. Thanks for the patch. It didn't work for what I needed (e.g. fetch the parent article) until I applied analogous changes to the other occurrence of search by message-id in nnimap.el: nnimap-request-article-part. Thanks, --Peter ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english
Re: nnimap and searching articles by message-id
On Mon, 21 Sep 2009 16:25:11 -0700 (PDT) janko hrasko wrote: jh> --- On Sat, 9/19/09, Reiner Steib wrote: >> > It turns out that the IMAP server I am using >> >> Which IMAP server software is it? jh> It is a part of Oracle Beehive collaboration suite. >> >> > requires the message-id be stripped of the enclosing >> angle brackets >> > when searching for messages like so: >> > >> > UID SEARCH HEADER Message-Id ".y...@foobar.com" >> > >> > Not sure who is not compliant here: Gnus/nnimap or the >> IMAP server? >> >> Cc-ing the developer list. Maybe someone there >> knows. jh> It would be good to know. What do people think? A quick scan through the RFC2822 - Internet Message Format reveals the following, but I am not sure if that is enough to convince anyone. jh>Semantically, the angle bracket characters are not part of the jh>msg-id; the msg-id is what is contained between the two angle bracket jh>characters. jh> Thanks for the patch. It didn't work for what I needed (e.g. fetch jh> the parent article) until I applied analogous changes to the other jh> occurrence of search by message-id in nnimap.el: jh> nnimap-request-article-part. Can you and Reiner put together a patch? Should be a simple one. I think stripping off the angle brackets MAY cost some efficiency in other IMAP servers (maybe they hash by the full message ID), but I don't know. The SEARCH reference in RFC 3501 (http://www.ietf.org/rfc/rfc3501.txt) says that search by any field is by contained string, so as far as the standard is concerned stripping off the angle brackets is harmless. I would make it a user option unless we're sure Courier, Dovecot, Exchange, and UW IMAP will work the same way with and without the change. Ted ___ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english