unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Jameson Graef Rollins <jrollins@finestructure.net>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH 0/6] notmuch cli config changes
Date: Thu, 07 Feb 2013 08:43:34 +0100	[thread overview]
Message-ID: <878v70lgbd.fsf@nikula.org> (raw)
In-Reply-To: <871ucts54t.fsf@servo.finestructure.net>

On Wed, 06 Feb 2013, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Tue, Jan 29 2013, Jani Nikula <jani@nikula.org> wrote:
>> Hi all, the goal here is to add support for --config=FILE option at the
>> notmuch top level (e.g. 'notmuch --config=FILE search foo'). In order to
>> achieve this neatly, I ended up moving config open/close to main() from
>> subcommands. This isn't a bad thing, because all notmuch commands opened
>> the config file anyway.
>
> Hi, Jani.  I appreciate you've put a lot of work into this series, but
> I'll be the same devil's advocate that I was to David previously.  Why
> do we need a command line option here when we already have an
> environment variable that handles just this?  Is there some benefit to
> having a command line option for this that I don't see?  I see this as
> another instance of an option that regular users will rarely use, if
> ever.

Fair enough.

In any case I see patches 1-4, and to an extent also patch 5, as useful
refactoring and cleanup. Also, if we ever end up having any top level
arguments that need to be passed to subcommands, I think patches 1-5 are
good prep work. The config struct could be extended to include both
settings from the config file and settings from the top level
arguments. But this is just a bonus in addition to the refactoring part.

> In general, I am a strong advocate of keeping the CLI slim.  IMHO,
> adding more options makes the interface clunkier, and the manual harder
> to parse, and I'm against adding things that a normal user would likely
> never use.  In retrospect, I should have had the same objection to the
> --format-version option, which I think could have just been an env var
> as well.

What is a "normal user"? I'm a user too.


BR,
Jani.

  reply	other threads:[~2013-02-07  7:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 21:46 [PATCH 0/6] notmuch cli config changes Jani Nikula
2013-01-29 21:46 ` [PATCH 1/6] cli: keep track of whether the config is newly created Jani Nikula
2013-03-03 16:13   ` David Bremner
2013-01-29 21:46 ` [PATCH 2/6] cli: make notmuch_config_open() "is new" parameter input only Jani Nikula
2013-03-03 16:17   ` David Bremner
2013-01-29 21:46 ` [PATCH 3/6] cli: abstract subcommand finding into a new function Jani Nikula
2013-03-03 16:23   ` David Bremner
2013-01-29 21:46 ` [PATCH 4/6] cli: plug main notmuch command into subcommand machinery Jani Nikula
2013-03-03 16:28   ` David Bremner
2013-01-29 21:46 ` [PATCH 5/6] cli: move config open/close to main() from subcommands Jani Nikula
2013-01-29 21:46 ` [PATCH 6/6] cli: add top level --config=FILE option Jani Nikula
2013-03-03 16:32   ` David Bremner
2013-02-06 17:50 ` [PATCH 0/6] notmuch cli config changes Jameson Graef Rollins
2013-02-07  7:43   ` Jani Nikula [this message]
2013-02-07 12:07   ` David Bremner
2013-02-12  7:50     ` Jameson Graef Rollins
2013-02-12 11:42       ` David Bremner
2013-02-12 16:54         ` Jameson Graef Rollins
2013-02-12 18:53           ` David Bremner
2013-02-13  7:51             ` Mark Walters
2013-02-12 20:06           ` Jani Nikula
2013-03-03 16:36             ` David Bremner

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=878v70lgbd.fsf@nikula.org \
    --to=jani@nikula.org \
    --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).