Re: [PATCH 0/6] notmuch cli config changes
authorJani Nikula <jani@nikula.org>
Thu, 7 Feb 2013 07:43:34 +0000 (08:43 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:30 +0000 (09:53 -0800)
2c/e48ea861e6e7eb9ebb374a82dad15ae79808f6 [new file with mode: 0644]

diff --git a/2c/e48ea861e6e7eb9ebb374a82dad15ae79808f6 b/2c/e48ea861e6e7eb9ebb374a82dad15ae79808f6
new file mode 100644 (file)
index 0000000..3f2f6d1
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8CB27431FB6\r
+       for <notmuch@notmuchmail.org>; Wed,  6 Feb 2013 23:43:50 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id OZ0JZahKDuIA for <notmuch@notmuchmail.org>;\r
+       Wed,  6 Feb 2013 23:43:48 -0800 (PST)\r
+Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com\r
+       [209.85.214.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A5D97431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  6 Feb 2013 23:43:48 -0800 (PST)\r
+Received: by mail-bk0-f44.google.com with SMTP id j4so1023213bkw.3\r
+       for <notmuch@notmuchmail.org>; Wed, 06 Feb 2013 23:43:47 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type:x-gm-message-state;\r
+       bh=tOsrWtKxsy9uojNq1+QJ7/HMf5MpkA19A4c/fGppRS8=;\r
+       b=KWZE7tJr1tGwKgvMQxAeYnXSLJ3FeKNGWBfyhe8Q2ZMhCX2x4J+zA3s9gQO5cEsDb4\r
+       XWuvx/OryJ+2pPMWzJycaht7JNdv5vo8vAR0FUceblHOdR1kb8XJxh+v3E5a0APZpuDE\r
+       oJgwF8D3DrffGqPnqa/JHlSqiULYhD4f4HgisTj9OPpL1fJeuprmPlO+aJ+jWrldvpGC\r
+       XZfY9bMJ/BDK+Iu9kRuKE0dMz4aOk47/9Z1VGTko1z5aQP6BzN7FbNIfd5/Neg8ruIBf\r
+       xEb442tXDcjZVuCYZ70jSuUITkW/0z2U35mbmev6c0lhxvD5XHK/zfG/ZBmHIB0hJAOq\r
+       y96A==\r
+X-Received: by 10.204.129.16 with SMTP id m16mr80625bks.103.1360223025419;\r
+       Wed, 06 Feb 2013 23:43:45 -0800 (PST)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+       by mx.google.com with ESMTPS id x10sm8735663bkv.13.2013.02.06.23.43.41\r
+       (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
+       Wed, 06 Feb 2013 23:43:43 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 0/6] notmuch cli config changes\r
+In-Reply-To: <871ucts54t.fsf@servo.finestructure.net>\r
+References: <cover.1359495450.git.jani@nikula.org>\r
+       <871ucts54t.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.14+259~gdee88db (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 07 Feb 2013 08:43:34 +0100\r
+Message-ID: <878v70lgbd.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkqQhUolnBCy5Oe1AaoYAx/mwpdMSKb6jTjf0Cs4FzZ3yICGElry404ww+1Wjge7g2kWong\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Thu, 07 Feb 2013 07:43:50 -0000\r
+\r
+On Wed, 06 Feb 2013, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> On Tue, Jan 29 2013, Jani Nikula <jani@nikula.org> wrote:\r
+>> Hi all, the goal here is to add support for --config=FILE option at the\r
+>> notmuch top level (e.g. 'notmuch --config=FILE search foo'). In order to\r
+>> achieve this neatly, I ended up moving config open/close to main() from\r
+>> subcommands. This isn't a bad thing, because all notmuch commands opened\r
+>> the config file anyway.\r
+>\r
+> Hi, Jani.  I appreciate you've put a lot of work into this series, but\r
+> I'll be the same devil's advocate that I was to David previously.  Why\r
+> do we need a command line option here when we already have an\r
+> environment variable that handles just this?  Is there some benefit to\r
+> having a command line option for this that I don't see?  I see this as\r
+> another instance of an option that regular users will rarely use, if\r
+> ever.\r
+\r
+Fair enough.\r
+\r
+In any case I see patches 1-4, and to an extent also patch 5, as useful\r
+refactoring and cleanup. Also, if we ever end up having any top level\r
+arguments that need to be passed to subcommands, I think patches 1-5 are\r
+good prep work. The config struct could be extended to include both\r
+settings from the config file and settings from the top level\r
+arguments. But this is just a bonus in addition to the refactoring part.\r
+\r
+> In general, I am a strong advocate of keeping the CLI slim.  IMHO,\r
+> adding more options makes the interface clunkier, and the manual harder\r
+> to parse, and I'm against adding things that a normal user would likely\r
+> never use.  In retrospect, I should have had the same objection to the\r
+> --format-version option, which I think could have just been an env var\r
+> as well.\r
+\r
+What is a "normal user"? I'm a user too.\r
+\r
+\r
+BR,\r
+Jani.\r