Show email adress in output of `notmuch search --format json`

Edgar Hipp contact at javascript-ninja.fr
Fri Jun 2 02:30:35 PDT 2017


On Fri, Jun 02, 2017 at 11:28:06AM +0200, Edgar Hipp wrote:
> On Fri, Jun 02, 2017 at 10:08:30AM +0100, David Edmondson wrote:
> > 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.
> 
> It seems that my notmuch show does'nt show multiple outputs : 
> 
> $ notmuch --version
> notmuch 0.24.1
> 
> $ notmuch show --body=false --format=json "*" | wc -l
> 1
> 
> $ notmuch search --format=json "*" | wc -l
> 3481
> 
> Thanks in advance,
> 
> Edgar

fzf starts as soon as one line is in stdin.
I use it a lot for log searching , and also in real time.

When I use my search command, I will probably first filter the results
very grossly (to have less than 1000 mails to fuzzy find).




More information about the notmuch mailing list