unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Show email adress in output of `notmuch search --format json`
@ 2017-06-01  6:59 Edgar Hipp
  2017-06-01  9:41 ` David Edmondson
  0 siblings, 1 reply; 8+ messages in thread
From: Edgar Hipp @ 2017-06-01  6:59 UTC (permalink / raw)
  To: notmuch

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@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@idealcoursier.com", "authors": "-a l'attention de contact-", "subject": "[SPAM] Lettre d'information", "query": ["id:SKT8635X-JCWL-FS8M-IDH7-WTK8XFCLCQ@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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Show email adress in output of `notmuch search --format json`
@ 2017-06-02 10:40 Edgar Hipp
  0 siblings, 0 replies; 8+ messages in thread
From: Edgar Hipp @ 2017-06-02 10:40 UTC (permalink / raw)
  To: David Edmondson; +Cc: notmuch

Indeed, notmuch show works, i just saw one line, but actually, the line is an array of messages `[]`, so I guess I can make it work. 

For the filtering, fzf starts filtering whenever there is some input, and the filter is also applied to new lines. 

I will send you a gif once my script is ready if you're curious

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-02 11:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-01  6:59 Show email adress in output of `notmuch search --format json` Edgar Hipp
2017-06-01  9:41 ` David Edmondson
2017-06-02  8:35   ` Edgar Hipp
2017-06-02  9:08     ` David Edmondson
2017-06-02  9:28       ` Edgar Hipp
2017-06-02  9:30         ` Edgar Hipp
2017-06-02 10:11         ` David Edmondson
  -- strict thread matches above, loose matches on Subject: below --
2017-06-02 10:40 Edgar Hipp

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).