Gnus development mailing list
 help / color / mirror / Atom feed
* IMAP searching - any thoughts ?
@ 2000-06-15  9:22 dme
  2000-06-15 11:22 ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: dme @ 2000-06-15  9:22 UTC (permalink / raw)


I often want to search through one (or more) IMAP folder(s) for
something.  At the moment that's laborious, as nnir.el doesn't work
for IMAP and entering the folder and then figuring out how to search
is a pain.

Has anyone thought about something like the nnweb.el searching tools
for IMAP servers ?

I've had a look, and I'm out of my elisp/gnus depth.  Experimentation
so far has led to the following:

(defun dme-imap-search (s)
  "a very shoddy way to use imap searching in Gnus.  point must be on the
INBOX line in the group list buffer.  sorry."
  (interactive "ssearch string: ")
  (let* ((b (imap-open "localhost"))
	(d (imap-authenticate "dme" "a strange tale indeed" b))
	(d (imap-mailbox-select "INBOX" nil b))
	(msgs (imap-search s b))
	(imap-close b))
    (gnus-group-read-group nil nil nil msgs)
  )
)

which has already proved very useful, but it is obviously awful.  For
a start, it requires the user to understand the IMAP search primitive
(which is actually okay, as it's quite good).

Any alternatives ?

dme.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: IMAP searching - any thoughts ?
  2000-06-15  9:22 IMAP searching - any thoughts ? dme
@ 2000-06-15 11:22 ` Kai Großjohann
  2000-06-15 11:49   ` dme
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2000-06-15 11:22 UTC (permalink / raw)
  Cc: ding

dme@dme.org writes:

> I often want to search through one (or more) IMAP folder(s) for
> something.  At the moment that's laborious, as nnir.el doesn't work
> for IMAP and entering the folder and then figuring out how to search
> is a pain.

I'm really sorry that nnir.el does not work for IMAP.  It is intended
to work for IMAP.  Can you help me repair it?

kai
-- 
I like BOTH kinds of music.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: IMAP searching - any thoughts ?
  2000-06-15 11:22 ` Kai Großjohann
@ 2000-06-15 11:49   ` dme
  2000-06-15 12:48     ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: dme @ 2000-06-15 11:49 UTC (permalink / raw)
  Cc: ding

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 421 bytes --]

"kg" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
kg> I'm really sorry that nnir.el does not work for IMAP.  It is intended
kg> to work for IMAP.  Can you help me repair it?

Ouch.  It's ages since I tried nnir, and I couldn't see how to get
IMAP to work then.  My most humble apologies.  Where can I get the
latest version ?

dme.
-- 
David Edmondson, Director of Development, Thus plc.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: IMAP searching - any thoughts ?
  2000-06-15 11:49   ` dme
@ 2000-06-15 12:48     ` Kai Großjohann
  2000-06-15 13:10       ` dme
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2000-06-15 12:48 UTC (permalink / raw)
  Cc: ding

dme@thus.net writes:

> [...] Where can I get the latest version ?

ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/

Please tell me how it goes.

kai
-- 
I like BOTH kinds of music.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: IMAP searching - any thoughts ?
  2000-06-15 12:48     ` Kai Großjohann
@ 2000-06-15 13:10       ` dme
  0 siblings, 0 replies; 5+ messages in thread
From: dme @ 2000-06-15 13:10 UTC (permalink / raw)
  Cc: ding

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 808 bytes --]

"kg" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
kg> Please tell me how it goes.

I grabbed it and have it working.  Something that confused me was the
need to mark the groups before searching.

I've changed the IMAP search function to allow me to specify the full
string passed to the IMAP server:

;                 (imap-search (concat "TEXT \"" qstring "\"") buf))
                 (imap-search qstring buf))

Which allows searches such as:
        sentsince 13-jun-2000 body "woolly mammoth"
which is much quicker (on my Cyrus server anyway) than:
        text "woolly mammoth"
Admittedly, they don't necessarily produce the same results (the
latter is likely to get more), but that's part of the reason for the
change.

Thanks - it's most splendid !

dme.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-06-15 13:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-15  9:22 IMAP searching - any thoughts ? dme
2000-06-15 11:22 ` Kai Großjohann
2000-06-15 11:49   ` dme
2000-06-15 12:48     ` Kai Großjohann
2000-06-15 13:10       ` dme

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).