From: Jameson Graef Rollins Date: Mon, 26 Mar 2012 15:03:25 +0000 (+1700) Subject: Re: [PATCH 1/2] config: Add 'config list' command X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=06c47286cac76d62eeb85d72826e849b05e9ddc3;p=notmuch-archives.git Re: [PATCH 1/2] config: Add 'config list' command --- diff --git a/b6/02fb0a05a97723e73ad1f9a3e392020b3a1089 b/b6/02fb0a05a97723e73ad1f9a3e392020b3a1089 new file mode 100644 index 000000000..b3dbc07b3 --- /dev/null +++ b/b6/02fb0a05a97723e73ad1f9a3e392020b3a1089 @@ -0,0 +1,119 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1E830431FBD + for ; Mon, 26 Mar 2012 08:03:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.29 +X-Spam-Level: +X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id s9IoKOkUjMCx for ; + Mon, 26 Mar 2012 08:03:34 -0700 (PDT) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id 7FCAD431FAE + for ; Mon, 26 Mar 2012 08:03:34 -0700 (PDT) +Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by fire-doxen-postvirus (Postfix) with ESMTP id 1FA6E2E50D6A; + Mon, 26 Mar 2012 08:03:34 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new +Received: from finestructure.net (pool-108-27-62-184.nycmny.fios.verizon.net + [108.27.62.184]) (Authenticated sender: jrollins) + by fire-doxen-submit (Postfix) with ESMTP id 3FE902E50D4B; + Mon, 26 Mar 2012 08:03:30 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id 0A8D2573; Mon, 26 Mar 2012 08:03:29 -0700 (PDT) +From: Jameson Graef Rollins +To: Tomi Ollila , Peter Wang , + notmuch@notmuchmail.org +Subject: Re: [PATCH 1/2] config: Add 'config list' command +In-Reply-To: +References: <1332282698-7951-1-git-send-email-novalazy@gmail.com> + +User-Agent: Notmuch/0.11.1+335~gf868783 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Mon, 26 Mar 2012 08:03:25 -0700 +Message-ID: <87iphrl802.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 26 Mar 2012 15:03:35 -0000 + +--=-=-= +Content-Transfer-Encoding: quoted-printable + +On Wed, 21 Mar 2012 20:30:43 +0200, Tomi Ollila wrote: +> On Wed, 21 Mar 2012 09:31:37 +1100, Peter Wang wrote: +> > Add a command to list all keys in a given configuration section. +> >=20 +> > One use is as follows: a MUA may prefer to store data in a central +> > notmuch configuration file so that the data is accessible across +> > different machines, e.g. an addressbook. The list command helps +> > to implement features such as tab completion on the keys. +>=20 +> Before getting deeper into implementation it is good to remember +> that 'notmuch config' is loosely modeled after 'git config'. +>=20 +> git config --list outputs somewhat different output. +>=20 +> Maybe this command should be like 'notmuch config list-section-keys' + +Git's interface is completely inconsistent, so I see no reason to try to +emulate it in every regard. Let's just try to keep the notmuch +interface as nice and consistent as possible. + +I do agree, though, that I think I would prefer to see the output in the +same format as "git config --list". So I would suggest the command and +output be: + +$ notmuch config list +database.path=3D/home/jrollins/.mail +user.name=3DJameson Graef Rollins +user.primary_email=3Djrollins@finestructure.net +user.other_email=3D +new.tags=3Dnew;unread +maildir.synchronize_flags=3Dfalse +search.exclude_tags=3Ddeleted;spam; + +That seem like a much more generally useful output. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iQIcBAEBCAAGBQJPcIU+AAoJEO00zqvie6q8QYgP/3Jsvp6qsKVUvov9KfO9ADcR +lPV7g/WDslJ4D/t8xBH5Vk25tXYPdYWUVfzkx9gmNVpNEMvJQ2vxRDXzNavzJvGH +WX/N6qv0S30viUHp0R772MvzJSwnmtG4n6asEeReF4jJvufD5+P4s2e4RdnM/R95 +VmIhDbvvDbGZlGVVDxmspphovS1mnfQWL4B63NCir5yMJEx/1n6EqUqLC3xuyiot +n2vvKeZvDuBwa8HJFosTTee3qIoOUi4k5XoEe8PL2lh6cFDLWlMXpEII4hzbbbPH +br1QxIa5R2t0kvKFBA1rkWqwpcOmMmSfiTAtYghaAnQzHTX28AQz3xT0hUgCH/EQ +qQ8yX8cY8EiZQ6lkbp/ua3FApI0fCiAiAVBX/+2OJh4CrCrrGV2vyhuRkC0wBXSu +Q8nAk31Sx2ZDAVhqOPdpf3E9GvC+jBByY5qF7utSmacE0LJNH1Z4/aUKHaHVypWc +ygcDvoptwCzYN841xC6NEY+pMfkR69c6yb1Yb2mqIrY/+YvlyB8lYjbJZpjEMI8E +z+WXUo1wYF+7hp9infeGxw01oLVRVxnNV5u0OZw4j/6FfLDtKG4xmWb9z0HAhXQu +8Zotg1Vz65zntVfgq7fZXIJ6bANzX9bKvu8J1kxmZB3qsdjy7iLY+oDhlRFPr53K +7/tHrJXhiN3czozYE9Yb +=8EXX +-----END PGP SIGNATURE----- +--=-=-=--