From ee4842ffb683c6c629b07994f7ba7cc06c4e7c9b Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Thu, 22 Mar 2012 09:52:03 +1100 Subject: [PATCH] Re: [PATCH 1/2] config: Add 'config list' command --- 23/0ff48eac32c92d31d06718d21c73955d0bb10f | 91 +++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 23/0ff48eac32c92d31d06718d21c73955d0bb10f diff --git a/23/0ff48eac32c92d31d06718d21c73955d0bb10f b/23/0ff48eac32c92d31d06718d21c73955d0bb10f new file mode 100644 index 000000000..64133b30a --- /dev/null +++ b/23/0ff48eac32c92d31d06718d21c73955d0bb10f @@ -0,0 +1,91 @@ +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 C3641431FAF + for ; Wed, 21 Mar 2012 15:55:32 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 lzVT2m6m0nca for ; + Wed, 21 Mar 2012 15:55:31 -0700 (PDT) +Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com + [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 785DA431FAE + for ; Wed, 21 Mar 2012 15:55:31 -0700 (PDT) +Received: by pbcuo1 with SMTP id uo1so1413054pbc.26 + for ; Wed, 21 Mar 2012 15:55:29 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=date:message-id:from:to:cc:subject:in-reply-to:references + :mime-version:content-type:content-disposition + :content-transfer-encoding; + bh=3WhJ1BbHsMf5UozH/0IjwMfH8TXomI8n4sLyXBHCRzw=; + b=sNd2RkgDxStYLg6c5jmE78/JvSYvWO0yl6dotl1/LpBNk0+B2i0owXhsfBEhbVYX6t + Vwe22rJnFjeCujcVoMkftW0OkzhE761jsZFWFzH/9FTIFPlxIFDiQoVw/m7rpAazMBIf + EUIYEMrUqnFXr9SONr9denmS2STN1R62UAyvsuBgIpiB/ldwDB3lhAhJ+t9te9cjFn5f + ++VvXSV6H2FBXWFEW8MVFurKUXKfcgcbbuhc7vsbkk9kVNsuiGhSr6uH+xddDsqAtJk9 + ThJ/U24CRBqFSUl4JdrYhhzX8knh7llLRN0zS9FW4Atkan57MjPDdNjOxeYU7KMsN0kJ + 3Vmg== +Received: by 10.68.232.229 with SMTP id tr5mr4734437pbc.86.1332370529485; + Wed, 21 Mar 2012 15:55:29 -0700 (PDT) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPS id r6sm2292873pbq.56.2012.03.21.15.55.24 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 21 Mar 2012 15:55:26 -0700 (PDT) +Date: Thu, 22 Mar 2012 09:52:03 +1100 +Message-ID: <20120322095203.GA2632@hili.localdomain> +From: Peter Wang +To: Tomi Ollila +Subject: Re: [PATCH 1/2] config: Add 'config list' command +In-Reply-To: +References: <1332282698-7951-1-git-send-email-novalazy@gmail.com> + +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +Cc: notmuch@notmuchmail.org +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: Wed, 21 Mar 2012 22:55:32 -0000 + +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. +> > +> > 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. +> +> Before getting deeper into implementation it is good to remember +> that 'notmuch config' is loosely modeled after 'git config'. +> +> git config --list outputs somewhat different output. +> +> Maybe this command should be like 'notmuch config list-section-keys' + +That would be fine. The documentation never mentions keys, only +sections and items. The implementation seems to think item == group.key. + +Peter + +P.S. In the first patch free() should be g_strfreev(). -- 2.26.2