unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/6] notmuch cli config changes
@ 2013-01-29 21:46 Jani Nikula
  2013-01-29 21:46 ` [PATCH 1/6] cli: keep track of whether the config is newly created Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Jani Nikula @ 2013-01-29 21:46 UTC (permalink / raw)
  To: notmuch

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.

As an added bonus, after this it should be trivial to 1) add top level
command line arguments to override config, or 2) add global command line
parameters passed on to subcommands via config (even if not stored in
the config file).

In the end this results in a net reduction of code.

BR,
Jani.


Jani Nikula (6):
  cli: keep track of whether the config is newly created
  cli: make notmuch_config_open() "is new" parameter input only
  cli: abstract subcommand finding into a new function
  cli: plug main notmuch command into subcommand machinery
  cli: move config open/close to main() from subcommands
  cli: add top level --config=FILE option

 notmuch-client.h     |   35 ++++++-------
 notmuch-config.c     |   73 +++++++++-----------------
 notmuch-count.c      |   11 ++--
 notmuch-dump.c       |    7 +--
 notmuch-new.c        |   17 +++----
 notmuch-reply.c      |   15 ++----
 notmuch-restore.c    |   11 ++--
 notmuch-search.c     |   15 ++----
 notmuch-setup.c      |   22 ++++----
 notmuch-show.c       |   15 ++----
 notmuch-tag.c        |   15 ++----
 notmuch.c            |  138 +++++++++++++++++++++++++++-----------------------
 test/random-corpus.c |    2 +-
 13 files changed, 159 insertions(+), 217 deletions(-)

-- 
1.7.10.4

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

end of thread, other threads:[~2013-03-03 16:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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