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

Edgar Hipp contact at javascript-ninja.fr
Wed May 31 23:59:17 PDT 2017


Hello !

I'm building a tool that combines fzf (a fuzzy finder) and notmuch to
find email more interactively.

For that, it would be great if the --format=json would return not just
the author name, but also the author email.

I run : 

```
notmuch search  --format=json '*' | tail -1
```

And get following output : 

```
{"thread": "0000000000000b72", "timestamp": 1397639242, "date_relative": "2014-04-16", "matched": 1, "total": 1, "authors": "-a l'attention de contact-", "subject": "[SPAM] Lettre d'information", "query": ["id:SKT8635X-JCWL-FS8M-IDH7-WTK8XFCLCQ at idealcoursier.com", null], "tags": ["inbox"]}]
```

I would like to get the real email adress too : 

```
{"thread": "0000000000000b72", "timestamp": 1397639242, "date_relative": "2014-04-16", "matched": 1, "total": 1, "authoremail": "contact at idealcoursier.com", "authors": "-a l'attention de contact-", "subject": "[SPAM] Lettre d'information", "query": ["id:SKT8635X-JCWL-FS8M-IDH7-WTK8XFCLCQ at idealcoursier.com", null], "tags": ["inbox"]}]
```

More generally, it would be great to have a configuration option to
specify which fields you want, like how `git log --format=` works.

What do you think ?

Best,

Edgar



More information about the notmuch mailing list