Any thoughts on whether this should be an additional search field (Recipient: ?) or whether we should consider a minibuffer mode whereby the user can specify his own search-specific criteria? Since something Recipient isn't really a valid header field, and the minibuffer approach would be more flexible, I'm leaning towards the latter. Alternatively, we could add an additional "header field" in the MH-Search buffer such as "Additional Query Arguments:" in which the user can specify arguments to pass on to the search engine. Thoughts?
From: Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk>
To: mh-e-users at lists.sourceforge.net
Subject: How to do 'a:user at email.org' mairix search?
X-Mailer: MH-E 8.1; nmh 1.3; GNU Emacs 23.0.91
Date: Sat, 19 Sep 2009 13:45:14 +0100
Cc: Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk>
Message-ID: <11497.1253364314@rgc.damtp.cam.ac.uk>
Is it possible to specify mairix searches like the following in the
mh-search interface:
$ mairix -f ~/txt/MAIL/.mairix/config -r a:stephen at gnu.org
where the 'a:' searches in 'From', 'To' and 'CC' fields for the email
address?
If not, would it be of any use to anyone else if I wrote a function
along the lines of
M-x mh-mairix-search
which prompted for a mairix query in the minibuffer (rather than in a
search buffer) and then did the search, returning the results as a
normal mh-search would? (And how easy is to write such a thing? It
would presumably follow along the lines of mh-mairix-execute-search?)
Stephen
In general, mairix allows combining of fields (a: is equivalent to tcf:) and other things we do not allow (size and attachment name).
What I think would be best would be a search-engine specific search buffer where you could type in commands. Maybe with a bit of prompting on the syntax (it would know that what the search keywords were and how they could be combined) and a live help window below.
By live help window I mean that when you are ready to type a search pattern, it gives you the pattern keywords. Once you type a colon, it tells you what syntax is valid for the keywords you typed.
Thanks.
Jeff
This just in from Nick. Looking at the mairix man page, it appears that the list below is rather complete. Maybe our MH-Search buffer should display everything that the engine in use can support. Many times I type in the Message-ID field which is a pain. It would be nice if it were there already. While a general version might be useful, adding the search terms to the buffer will save him from going to the man page to look up the syntax--a real plus.
To: mh-e-users@lists.sourceforge.net
From: Nick Dokos <nicholas.dokos@hp.com>
Subject: Re: How to do 'a:user@email.org' mairix search?
Organization: HPCS
X-Mailer: MH-E 8.3; nmh 1.3; GNU Emacs 24.0.90
Date: Tue, 27 Dec 2011 00:11:52 -0500
Message-ID: <12560.1324962712@alphaville.dokosmarshall.org>
This particular search can be done already, I believe,
by adding a header like this in the search-pattern buffer:
Address: stephen@gnu.org
followed by C-c C-c.
The complete list of such translations is in mh-mairix-regexp-builder:
,----
| ...
| (cond ((eq (car pair) 'to) "t:")
| ((eq (car pair) 'from) "f:")
| ((eq (car pair) 'cc) "c:")
| ((eq (car pair) 'to-or-cc) "tc:")
| ((eq (car pair) 'address) "a:")
| ((eq (car pair) 'subject) "s:")
| ((eq (car pair) 'subject-or-body) "bs:")
| ((eq (car pair) 'date) "d:")
| ((eq (car pair) 'message-id) "m:")
| ((eq (car pair) 'message-body) "b:")
| ((eq (car pair) 'message-size) "z:")
| ((eq (car pair) 'message-attachment-name) "n:")
| ((eq (car pair) 'message-flags) "F:")
| ...
`----
Of course, this is no substitute for the much more general version that
Bill is asking about in the feature request.
Nick
Bumping priority since this seems popular.
Bill and I agree that to address this bug we will add the missing header fields and an additional header field (Mairix:) that takes a raw search string. This will preserve the current interface as well as being able to save searches.
Hmm, we'll need a method-specific search buffer initialization file to add the additional headers by default. And this may cause a explicit pick to fail. Needs more discussion.
Ticket moved from /p/mh-e/feature-requests/160/