On 19May2014 21:08, Rejo Zenger <[email protected]> wrote:
Any implementation of mu into mutt I have found or could think of
requires a two step process. One that does the actual search and
compiles a list of results, another to browse this list. [1]

Now, I would like to do this more smoothly: only give one command (one
shortcut), provide the search string and have the results returned
immediately. Does anyone know if this is possible - other than hacking
the code of mutt?

[1] http://dev.mutt.org/trac/wiki/UseCases/SearchingMail

My approach to this is twofold.

I used to use mairix and now use notmuch.

I just have a shell script that does a notmuch search and then brings up mutt on the resulting mail folder, and tidies up afterwards. Very easy.

Then for "integration", just write a mutt macro that invokes an incomplete shell command, which just needs the search terms appended and for you to press [Enter].

In my case, the wrapper script is "notmuch-search":

  https://bitbucket.org/cameron_simpson/css/src/tip/bin/notmuch-search

for which I have convenience shell alias "++" mapped to "notmuch-search -S". Based on that, I also have a mutt alias bound to "++" to do the same thing:

  macro index,pager ++ '!notmuch-search -S '

(The -S means run up the results in a screen session.)

I'd think you could adapt this approach to your own mail indexer.

Cheers,
Cameron Simpson <[email protected]>

The Design View editor of Visual InterDev 6.0 is currently incompatible
with Compatibility Mode, and may not function correctly.
- George Politis <[email protected]>, 22apr1999,
  quoting http://msdn.microsoft.com/vstudio/technical/ie5.asp

Reply via email to