Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nnir with maildirs and swish-e

1 view
Skip to first unread message

Andy Jacobson

unread,
Nov 6, 2003, 1:34:37 PM11/6/03
to
Howdy Folks,

Gnus 5.10.2
Gnu emacs 21.1.1
nnir.el 1.3 from http://quimby.gnus.org (~ 1.80?)
swish-e 2.4.0

Once upon a time I had nnir working with nnml mail, but now I've
switched to using nnmaildir, and I'm having a spot of difficulty.
nnir continually returns empty results:

Doing swish-e query ((query . kai))...
swish-e args: -f /home/aos/andyj/Mail/maildirs/.index.swish-e -w kai
Massaging swish-e output...done
Search produced empty results.
gnus-group-read-ephemeral-group: Couldn't request group: Search
produced empty results.

However, a swish-e search at the command line returns e.g.:

swish-e -f /home/aos/andyj/Mail/maildirs/.index.swish-e -w kai
# SWISH format: 2.4.0
# Search words: kai
# Removed stopwords:
# Number of hits: 12
# Search time: 0.068 seconds
# Run time: 0.118 seconds
1000 Trash/cur/1067995483.M165311P9958Q0.tazman.Princeton.EDU:2, \
"1067995483.M165311P9958Q0.tazman.Princeton.EDU:2," 160366
633 Jacobson/cur/1068008269.M460437P11971Q0.tazman.Princeton.EDU:2, \
"1068008269.M460437P11971Q0.tazman.Princeton.EDU:2," 577481
...

I suspect nnir-swish-e-remove-prefix. The group names should be Trash
and Jacobson (right?) and so I've been assuming that prefix == "" is
correct. Various permutations of the default ("~/Mail",
"~/Mail/maildirs") don't work either. Can nnir understand the "/cur/"
business above, which I suppose is part of the maildir protocol? Any
other ideas?

Thanks!

Andy

Christoph Conrad

unread,
Nov 11, 2003, 3:32:00 AM11/11/03
to
Hi Andy,

> I've switched to using nnmaildir

I've seen into the source, and it seems to me that it seems a little
bit more work adapting nnir for the nnmaildir backend, sorry.

> I suspect nnir-swish-e-remove-prefix.

No, that's not enough. It's a _pre_fix.

If you could find out which (definitely) is the article number in the
commandline output and what is the article number, i send you an
adjusted version which hopefully will work for you.

Later i'll integrate that back into nnir so that nnir seach engines
can deal with nnml and nnmaildir.

Herzliche Grüße,
Christoph
--
"Lieber ein kleiner Teil von etwas ganz Großem als ein großer Teil von
einem Haufen Scheiße." (Franziska van Almsick)

Andy Jacobson

unread,
Nov 12, 2003, 12:34:19 PM11/12/03
to
Hi Christoph,

Thanks for your reply.

> If you could find out which (definitely) is the article number in the
> commandline output and what is the article number, i send you an
> adjusted version which hopefully will work for you.

So if I have the directory and file names of the maildir articles
satisfying the search criteria, is it possible to translate this into
group names and article numbers?

Thanks,

Andy

Christoph Conrad

unread,
Nov 12, 2003, 5:38:20 PM11/12/03
to
Hi Andy,

> So if I have the directory and file names of the maildir
> articles satisfying the search criteria, is it possible to
> translate this into group names and article numbers?

I hope so... Choose an easy to find article in gnus included in your
nnmaildir backend and search it with swish-e. Send the whole headers
of the article in raw format ("C-u g" on the article in the summary
buffer) and the output line of swish-e to me.

Andy Jacobson

unread,
Nov 14, 2003, 2:18:28 PM11/14/03
to
Andy> So if I have the directory and file names of the maildir
Andy> articles satisfying the search criteria, is it possible to
Andy> translate this into group names and article numbers?

Christoph> I hope so... Choose an easy to find article in gnus
Christoph> included in your nnmaildir backend and search it with
Christoph> swish-e. Send the whole headers of the article in raw
Christoph> format ("C-u g" on the article in the summary buffer) and
Christoph> the output line of swish-e to me.

Hi Christoph,

Here's what you wanted. I was looking at the nnir code, and I see
that the group name is identified just fine by parsing the swish-e
output and using the nnir-group-full-name function. I verified this
using printf-style (well, (message )-style) debugging. So all that's
left is finding the article number, I suppose, to populate the article
list properly.

I'm surprised that we're looking in the message headers for the
article number. I'm not too familiar with the gnus internals, but I
was wondering wether we'd be trying to get the nnmaildir server to use
its NOV information to tell us the article number.

Best Regards,

Andy

p.s. Is m...@privacy.net email address valid? Should I also be
sending these messages to the newsgroup?

(1) " *nnir*" buffer (results of swish-e search):

1000 Simulation/cur/1067989494.M537145P8833Q0.tazman.Princeton.EDU:2,
"1067989494.M537145P8833Q0.tazman.Princeton.EDU:2," 3852

(2) Headers:

X-From-Line: jsm...@eng.auburn.edu Fri Dec 6 08:40:15 2002
Return-Path: <jsm...@eng.auburn.edu>
Received: from Eng.Auburn.EDU (dns.eng.auburn.edu [131.204.10.13])
by splash.princeton.edu (8.11.6/8.11.6) with ESMTP id gB6EfAV27843
for <an...@splash.princeton.edu>; Fri, 6 Dec 2002 09:41:11 -0500
Received: from mfg (mfg.eng.auburn.edu [131.204.109.20])
by Eng.Auburn.EDU (8.11.6/8.11.6) with ESMTP id gB6Ef7n25676
for <an...@splash.princeton.edu>; Fri, 6 Dec 2002 08:41:07 -0600
(CST)
From: "Jeffrey S. Smith" <jsm...@eng.auburn.edu>
To: <an...@splash.princeton.edu>
Subject: RE: triangular distribution
Date: Fri, 6 Dec 2002 08:40:15 -0600
Organization: Auburn University
X-Gnus-Mail-Source: pop:an...@splash.princeton.edu
Message-ID: <000f01c29d35$6449a250$146dcc83@mfg>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2627
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
In-Reply-To: <f2kel8v...@tazman.Princeton.EDU>
X-Spam-Status: No, hits=-8.2 required=10.0
tests=IN_REP_TO,NOSPAM_INC,SIGNATURE_LONG_SPARSE,
SPAM_PHRASE_02_03
version=2.40-cvs
X-Spam-Level:
X-Content-Length: 2528
Lines: 71
Xref: tazman.Princeton.EDU mail.other:2275

Christoph Conrad

unread,
Nov 14, 2003, 5:07:54 PM11/14/03
to
Hi Andy,

> Here's what you wanted.

I thought you send it to _me_.

> but I was wondering wether we'd be trying to get the nnmaildir
> server to use its NOV information to tell us the article number.

You know more than i about nnmaildir.

> p.s. Is m...@privacy.net email address valid?

Yes, it's valid and explicitly allowed from privacy.net for
suppressing spam answers in newsgroups. The REAL reply address is in
Reply-To, see there.

> Should I also be sending these messages to the newsgroup?

It's getting very special here, so i propose to do not so. Any
results i will send to you per mail.

Kai Grossjohann

unread,
Dec 21, 2003, 9:05:57 AM12/21/03
to
an...@yovo.org (Andy Jacobson) writes:

> So if I have the directory and file names of the maildir articles
> satisfying the search criteria, is it possible to translate this into
> group names and article numbers?

Maybe nnmaildir-base-name-to-article-number works. But I don't know
anything about nnmaildir.

Kai

Charles Bacon

unread,
Jan 6, 2004, 8:06:07 PM1/6/04
to
Kai Grossjohann <k...@emptydomain.de> wrote in message news:<87r7yyg...@emptyhost.emptydomain.de>...

That seemed to do the trick for me.

From swish-e output:1000
/home/bacon/Maildir/INBOX.charlesbacon/cur/1065045382_0.10947.sylph.mcs.anl.gov,U=318,FMD5=e2f9d4c6f3d3f9e561c97b89cb4f4e9b:2,:2,
"1065045382_0.10947.sylph.mcs.anl.gov,U=318,FMD5=e2f9d4c6f3d3f9e561c97b89cb4f4e9b:2,:2,"
2890

I want a group name of "INBOX.charlesbacon" given the
nnir-swish-e-prefix of /home/bacon/Maildir/

I want to pass everything up to the ":" as the base-name to get the
article number. The following is an ugly patch to CVS version 7.1 of
nnir.el:

< (basename nil) (groupname nil) (score nil) (artno nil)
(dirnam nil) (group nil) )
---
> (score nil) (artno nil) (dirnam nil) (group nil) )
1229,1231c1229,1232
< ;; My changes: nnmaildir uses different format than other
backends.
< ;; (when (string-match "^[0-9]+$" artno)
< (when (not (null dirnam))
---
> ;; don't match directories
> (when (string-match "^[0-9]+$" artno)
> (when (not (null dirnam))
>
1235,1245c1236,1246
< ;; group name is the first subdir of dirnam
< (when (string-match "/.*$" dirnam)
< (setq groupname (replace-match "" t t dirnam)))
< ;; remove the suffix to get basename
< (when (string-match ":.*$" artno)
< (setq basename (replace-match "" t t artno)))
<
< (setq artno (nnmaildir-base-name-to-article-number
basename
<
groupname
< nil))
< (push (vector (nnir-group-full-name groupname server)
< artno
---
>
> (setq dirnam (substring dirnam 0 -1))
> ;; eliminate all ".", "/", "\" from beginning. Always matches.
> (string-match "^[./\\]*\\(.*\\)$" dirnam)
> ;; "/" -> "."
> (setq group (substitute ?. ?/ (match-string 1 dirnam)))
> ;; Windows "\\" -> "."
> (setq group (substitute ?. ?\\ group))
>
> (push (vector (nnir-group-full-name group server)
> (string-to-int artno)
1247c1248
< artlist)))
---
> artlist))))

0 new messages