argument parsing refactor, add shared options
authorDavid Bremner <david@tethera.net>
Sun, 5 Apr 2015 20:59:30 +0000 (05:59 +0900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:41 +0000 (14:48 -0700)
94/12caa9d0d84a8c70ffe55874865eb38fc179bd [new file with mode: 0644]

diff --git a/94/12caa9d0d84a8c70ffe55874865eb38fc179bd b/94/12caa9d0d84a8c70ffe55874865eb38fc179bd
new file mode 100644 (file)
index 0000000..8bfc1e3
--- /dev/null
@@ -0,0 +1,78 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 6F1086DE1B50\r
+ for <notmuch@notmuchmail.org>; Sun,  5 Apr 2015 14:34:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.631\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.631 tagged_above=-999 required=5 tests=[AWL=0.621, \r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 3RLnfj6N6Zqv for <notmuch@notmuchmail.org>;\r
+ Sun,  5 Apr 2015 14:34:13 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+ [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 715F16DE1B5B\r
+ for <notmuch@notmuchmail.org>; Sun,  5 Apr 2015 14:34:13 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+ 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1Yeres-0002RV-Pp\r
+ for notmuch@notmuchmail.org; Sun, 05 Apr 2015 21:00:42 +0000\r
+Received: (nullmailer pid 29545 invoked by uid 1000); Sun, 05 Apr 2015\r
+ 21:00:24 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: argument parsing refactor, add shared options\r
+Date: Mon,  6 Apr 2015 05:59:30 +0900\r
+Message-Id: <1428267574-28797-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 05 Apr 2015 21:34:15 -0000\r
+\r
+As part of ongoing hacking on Austin's revision tracking patches, I\r
+wanted to add an option to (almost) all subcommands. One thing led to\r
+another and this series emerged. By itself, the gain in functionality\r
+is probably not worthwhile (yay, we can type notmuch subcommand\r
+--version), but internally it makes it easy to add further "global\r
+options" that are accepted as\r
+\r
+% notmuch --option [subcommand]\r
+\r
+and\r
+\r
+% notmuch subcommand --option\r
+\r
+it would make sense, e.g. for --quiet and --verbose to be supported\r
+this way.\r
+\r
+Whatever people think about the shared options, I think the\r
+refactoring of notmuch_help_command is probably worthwhile as it is\r
+pretty simple and improves the readability of that code.\r
+\r
+Although there are other ways of doing so, patch 4 of this series also\r
+fixes a UI bug encountered by Rob recently, where "--config" is silently ignored\r
+in\r
+\r
+       notmuch setup --config=/tmp/foo.conf\r
+\r
+In principle this series will need a documentation update, but note that\r
+\r
+   notmuch search --help\r
+\r
+is already undocumented.\r
+\r