From 9c7b85e2da456e554282818b00e481d2c1dbdbe7 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Tue, 4 Nov 2014 09:14:58 +0000 Subject: [PATCH] Re: [RFC PATCH 0/2] cli: split 'notmuch address' from 'notmuch search' --- 60/0f875d656f5e9140a2056bc5e5b7cc8cfb3fff | 151 ++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 60/0f875d656f5e9140a2056bc5e5b7cc8cfb3fff diff --git a/60/0f875d656f5e9140a2056bc5e5b7cc8cfb3fff b/60/0f875d656f5e9140a2056bc5e5b7cc8cfb3fff new file mode 100644 index 000000000..85ebcdf0a --- /dev/null +++ b/60/0f875d656f5e9140a2056bc5e5b7cc8cfb3fff @@ -0,0 +1,151 @@ +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 78BCE429E41 + for ; Tue, 4 Nov 2014 01:15:25 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 UEusnN6X7nqL for ; + Tue, 4 Nov 2014 01:15:21 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id A4864429E40 + for ; Tue, 4 Nov 2014 01:15:21 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1XlaCZ-0007k8-Bj; Tue, 04 Nov 2014 09:15:19 +0000 +Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1XlaCZ-0005JQ-0X; Tue, 04 Nov 2014 09:14:59 +0000 +From: Mark Walters +To: Jani Nikula , Michal Sojka +Subject: Re: [RFC PATCH 0/2] cli: split 'notmuch address' from 'notmuch + search' +In-Reply-To: +References: <87egtn2s4z.fsf@steelpick.2x.cz> + +User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 04 Nov 2014 09:14:58 +0000 +Message-ID: <87r3xj2up9.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 87.81.223.162 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: e99114c32f0de8f8d0c575c1d5234595 (of first 20000 bytes) +X-SpamAssassin-Score: -0.1 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -0.1 points. + Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.1 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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: Tue, 04 Nov 2014 09:15:25 -0000 + + +On Sat, 01 Nov 2014, Jani Nikula wrote: +> On Sat, 01 Nov 2014, Michal Sojka wrote: +>> On Sat, Nov 01 2014, Jani Nikula wrote: +>>> On Fri, 31 Oct 2014, Michal Sojka wrote: +>>>> This option allows to configure the criterion for duplicate address +>>>> filtering. Without this option, all unique combinations of name and +>>>> address parts are printed. This option allows to filter the output +>>>> more, for example to only contain unique address parts. +>>> +>>> This patch finally makes me think we should have a separate 'notmuch +>>> address' command for all of this. We are starting to have two orthogonal +>>> sets of 'notmuch search' options, one set for search and another for +>>> addresses. I regret not following the series and then making the +>>> observation so late. +>> +>> To some extent it is true. The question is whether it would make sense +>> for 'notmuch address' to have options like --offset and --limit. +>> Probably not. +>> +>> I can prepare a new patchset implementing 'notmuch address' over the +>> weekend. It would be necessary to revert the last (or two) already +>> merged patch. What do others think? +> +> Here's a couple of draft patches to make the search/address command +> split happen with minimal changes. +> +> In my opinion the problem is primarily in the user interface; +> notmuch-search man page is growing intimidating to the user. I also +> think splitting the implementation completely would lead to too much +> code duplication, as there is plenty of common code. The idea here is to +> split the user interface for address searching now when we haven't made +> a release with the functionality, and we can more easily change the code +> behind the interface going forward. Plus we can more comfortably add +> address management commands to 'notmuch address' than 'notmuch search' +> as the need arises. +> +> I do have to say in the end I'm also fine with having everything in the +> notmuch search command if there's opposition to having two very similar, +> even if diverging, commands. + +I like this change and have reviewed the large follow-up series. Would +this make it easy to support the generic notmuch options after the +command? In particular I often type/think notmuch search --help rather than +notmuch --help search. + +Best wishes + +Mark + + + + + +> +> BR, +> Jani. +> +> +> Jani Nikula (2): +> cli: add support for hierarchical command line option arrays +> cli: add notmuch address command +> +> command-line-arguments.c | 11 ++-- +> command-line-arguments.h | 1 + +> notmuch-client.h | 3 ++ +> notmuch-search.c | 128 ++++++++++++++++++++++++++++++----------------- +> notmuch.c | 2 + +> 5 files changed, 95 insertions(+), 50 deletions(-) +> +> -- +> 2.1.1 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2