unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Formatting nm-search output
@ 2022-08-18  9:01 martin f krafft
  2022-08-18 14:53 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: martin f krafft @ 2022-08-18  9:01 UTC (permalink / raw)
  To: notmuch discussion list


[-- Attachment #1.1.1: Type: text/plain, Size: 522 bytes --]

Is there a way to get notmuch search to print custom fields for the 
messages it returns, i.e. if I wanted to get a list of messages (not 
threads) matching my search terms, along with e.g. date, subject, 
from/to/cc, and body size?

Thanks,

-- 
@martinkrafft | https://matrix.to/#/#madduck:madduck.net
  
review of a chemistry paper:
   "paper should be greatly reduced or completely oxidized."
                                                     -- frank vastola
  
spamtraps: madduck.bogus@madduck.net

[-- Attachment #1.1.2: Type: text/html, Size: 1153 bytes --]

[-- Attachment #1.2: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current) --]
[-- Type: application/pgp-signature, Size: 1187 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: Formatting nm-search output
  2022-08-18  9:01 Formatting nm-search output martin f krafft
@ 2022-08-18 14:53 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2022-08-18 14:53 UTC (permalink / raw)
  To: martin f krafft, notmuch discussion list

martin f krafft <madduck@madduck.net> writes:

> Is there a way to get notmuch search to print custom fields for the 
> messages it returns, i.e. if I wanted to get a list of messages (not 
> threads) matching my search terms, along with e.g. date, subject, 
> from/to/cc, and body size?

Hi Martin;

Currently the short answer is no. There are several possible
workarounds.

1) Use the (apparently undocumented!) --unthreaded option to notmuch
show and then postprocess the json output

2) write a python script (using the notmuch2 module).

I have thought about having some custom output formatting (probably
based on some sexp dsl, since the code already uses sfsexp for query
parsing) but I apparently it never got farther than thinking.

d

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

end of thread, other threads:[~2022-08-18 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  9:01 Formatting nm-search output martin f krafft
2022-08-18 14:53 ` David Bremner

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).