unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: Jameson Graef Rollins <jrollins@finestructure.net>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH 2/3] cli: show allow the caller to specify the headers output.
Date: Fri, 13 Jul 2012 20:50:29 +0100	[thread overview]
Message-ID: <87bojjcuey.fsf@qmul.ac.uk> (raw)
In-Reply-To: <878venxxpe.fsf@servo.finestructure.net>

On Fri, 13 Jul 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Sat, Jul 07 2012, Mark Walters <markwalters1009@gmail.com> wrote:
>> +typedef enum {
>> +    NOTMUCH_SHOW_OUTPUT_HDR_DATE = 0x1,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_SUBJECT = 0x2,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_FROM = 0x4,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_TO = 0x8,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_CC = 0x10,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_REPLY_TO = 0x20,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_IN_REPLY_TO = 0x40,
>> +    NOTMUCH_SHOW_OUTPUT_HDR_REFERENCES = 0x80,
>> +    NOTMUCH_SHOW_OUTPUT_DEFAULT =
>> +	    NOTMUCH_SHOW_OUTPUT_HDR_SUBJECT |
>> +	    NOTMUCH_SHOW_OUTPUT_HDR_FROM |
>> +	    NOTMUCH_SHOW_OUTPUT_HDR_TO |
>> +	    NOTMUCH_SHOW_OUTPUT_HDR_CC |
>> +	    NOTMUCH_SHOW_OUTPUT_HDR_DATE
>> +} notmuch_show_output_t;
>
> Is there a reason we need to limit this to some pre-defined subset of
> headers?  Wouldn't it be nice if you could just specify arbitrary
> headers?

I basically agree but it looked like it would be relatively ugly to pass
around. 

However, perhaps this is all being too general: the caller probably
cares that all the headers it wants are output and perhaps not too many
others (eg over ssh or to android etc). Would something more like
headers=brief or headers=full be enough? And we would still want an
option allowing the body to be omitted.

What do you think?

Best wishes

Mark

  reply	other threads:[~2012-07-13 19:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bojjcuey.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=jrollins@finestructure.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).