David Edmondson <dme@dme.org> writes: > On Monday, 2021-01-18 at 13:37:08 -04, David Bremner wrote: > >> David Edmondson <dme@dme.org> writes: >> >>> Similar to other formats, allow the body to be omitted when outputting >>> raw messages. >>> >>> This can be used by UI code to get the full headers of a message >>> without the need to consume the body, which may be large. >> >> I guess I'm a bit confused why this is for "raw" format, and not >> "text". Are you proposing that we have two ad-hoc output formats for >> consuming by scripts and other tools that don't want JSON or SEXP? > > "text" is a strange archaic output format, the rationale for which seems > lost in time :-) Yeah, at one time I wanted to get rid of it, but inter alia the vim bindings use(d?) it. > I wanted to get the Autocrypt or Face headers, so ended up using > "--format=raw", but then end up with the entire message, which can be > megabytes large. With the emacs UI, that means pulling all of that data > into a buffer, just to ignore it. Ok thanks for explaining the use case. > Now, it would be nice to be able to say something like... > > notmuch show --format=sexp --body=false \ > --headers=received-by,face,x-face \ > id:foo > > ...to get some extra headers in the sexp output, but I didn't look at it > yet. There was a series at id:20191122230730.35712-2-johan.parin@gmail.com that got stalled due to (I think) some issues with passing around configuration information. > > The proposed change seems like a simple, obvious improvement that is > entirely in-line with the existing interface and implementation. Is > there any reason not to do it? I'm just nervous about more legacy formats. I think we will get the arbitrary headers thing working eventually, but I can see it might take some time. _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org