unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/3] Control notmuch show output
@ 2012-07-07 15:12 Mark Walters
  2012-07-07 15:12 ` [PATCH 1/3] cli: allow keyword lists in argument parser Mark Walters
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Mark Walters @ 2012-07-07 15:12 UTC (permalink / raw)
  To: notmuch

This is a first draft of a patch set allowing the caller to control
the output of notmuch show. This option should subsume the
--headers-only option (see
id:"1341041595-5858-1-git-send-email-markwalters1009@gmail.com") and
the reply-to patch
(id:"1340508470-16606-2-git-send-email-novalazy@gmail.com") as well as
being extensible.

It follows the suggestions made in
id:"20120704182459.GI2342@hili.localdomain" and
id:"CAB+hUn_sxy=QP1+OzGwKOcSYGi13Q61m4-bq+PGnYxCMPd0fvg@mail.gmail.com"

and modifies the cli parser to allow keyword lists of the form --output=from,cc,body

The first patch adds this functionality to the option parser. It uses
a bitfield to pass the flags specified so we are limited to 32 (or
perhaps 31) possible options.

The second patch implements this for the selection of which headers to
return. Since notmuch-reply.c wanted exactly this functionality (since
it wants in-reply-to headers and reference headers but not the date
header) it is converted to use this style.

The third patch uses this functionality to implement the
--headers-only functionality by adding a "body" option to the list of
things the user can choose to output or not. 

Currently, I have not written any tests for the new functionality,
updated the man page, or implemented for any format except JSON.

Do people have any comments in the current form?

Best wishes

Mark




Mark Walters (3):
  cli: allow keyword lists in argument parser.
  cli: show allow the caller to specify the headers output.
  cli: allow show to omit message bodies.

 command-line-arguments.c |   47 +++++++++++++++++++++++
 command-line-arguments.h |    3 +-
 notmuch-client.h         |   26 ++++++++++++-
 notmuch-reply.c          |   12 +++++-
 notmuch-show.c           |   92 +++++++++++++++++++++++++++++++--------------
 5 files changed, 146 insertions(+), 34 deletions(-)

-- 
1.7.9.1

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

end of thread, other threads:[~2012-07-14 16:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-07 15:12 [PATCH 0/3] Control notmuch show output Mark Walters
2012-07-07 15:12 ` [PATCH 1/3] cli: allow keyword lists in argument parser Mark Walters
2012-07-07 15:12 ` [PATCH 2/3] cli: show allow the caller to specify the headers output Mark Walters
2012-07-13 19:33   ` Jameson Graef Rollins
2012-07-13 19:50     ` Mark Walters
2012-07-13 20:37       ` Jameson Graef Rollins
2012-07-07 15:12 ` [PATCH 3/3] cli: allow show to omit message bodies Mark Walters
2012-07-11 12:29 ` [PATCH 0/3] Control notmuch show output Peter Wang
2012-07-14 16:49 ` Mark Walters

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