Show email adress in output of `notmuch search --format json`
David Edmondson
dme at dme.org
Fri Jun 2 02:08:30 PDT 2017
On Friday, 2017-06-02 at 10:35:03 +0200, Edgar Hipp wrote:
> What I'm doing is basically
>
> notmuch search --format=json '*' | processing_program | fzf
>
> Which makes it possible to search trough messages interactively : fzf is
> a fuzzy finder(see the gif on the page https://github.com/junegunn/fzf)
>
> What I would expect is to have the same format as show but for multiple
> messages, (in my case for search).
>
> That's why I would find it interesting to be able to customize the
> fields shown in search.
Understood. There is no general ability to customise the fields today.
Would:
notmuch show --body=false --format=json "*" | other_processing | fzf
let you achieve your goal? (The processing would have to change, of
course.)
In general, I wonder whether “search” or “show” for “*” will give you
the performance you want if fzf waits for all of the input before
allowing the user to start matching.
For example, with 0.5 million messages in a database:
% time notmuch search --format=json "*" > /dev/null
notmuch search --format=json "*" > /dev/null 108.14s user 35.55s system 75% cpu 3:10.18 total
%
(Not a particularly fast machine, but all of the relevant stuff is on
SSD.)
If I had to wait 108 seconds to start matching it would be
unusable. “show” will probably be slower.
dme.
--
You know your green from your red.
More information about the notmuch
mailing list