From 76a4352008f619714afdb6ef8cee5086bfec753f Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 31 Oct 2014 08:54:38 +0000 Subject: [PATCH] Re: [PATCH v5 0/7] notmuch search --output=sender/recipients --- d8/863fcde96de0921b630108f835382c22d2bd9d | 173 ++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 d8/863fcde96de0921b630108f835382c22d2bd9d diff --git a/d8/863fcde96de0921b630108f835382c22d2bd9d b/d8/863fcde96de0921b630108f835382c22d2bd9d new file mode 100644 index 000000000..aa278db46 --- /dev/null +++ b/d8/863fcde96de0921b630108f835382c22d2bd9d @@ -0,0 +1,173 @@ +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 23D60431FC9 + for ; Fri, 31 Oct 2014 01:54:56 -0700 (PDT) +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 dEi6GgApBeg7 for ; + Fri, 31 Oct 2014 01:54:52 -0700 (PDT) +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 ED4E7431FC2 + for ; Fri, 31 Oct 2014 01:54:51 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1Xk7yi-0003WW-0T; Fri, 31 Oct 2014 08:54:42 +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 1Xk7yh-00089K-78; Fri, 31 Oct 2014 08:54:39 +0000 +From: Mark Walters +To: Michal Sojka , notmuch@notmuchmail.org +Subject: Re: [PATCH v5 0/7] notmuch search --output=sender/recipients +In-Reply-To: <1414713573-21461-1-git-send-email-sojkam1@fel.cvut.cz> +References: <1414713573-21461-1-git-send-email-sojkam1@fel.cvut.cz> +User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Fri, 31 Oct 2014 08:54:38 +0000 +Message-ID: <878ujwvctt.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: 7aef95bcd98c060e85095d275d8a246a (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 +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: Fri, 31 Oct 2014 08:54:56 -0000 + +On Thu, 30 Oct 2014, Michal Sojka wrote: +> Hi all, +> +> this is v5 of the search --output=address series. It obsoletes v4 +> (id:1414421455-3037-1-git-send-email-sojkam1@fel.cvut.cz). +> +> I addresses comments from Mark and Tomi. Based on the comments to v4 +> and earlier versions, patches 1-4 should be ready for merging. Patch 5 +> is a non-controversial part of the controversial --filter-by patch and +> could be probably merged after review. + +I have looked at Patches 1-5 and tested. These look good to me. +1 + +My only query is in the text output: should the name part be printed as +a quoted string. For example currently I get a line of the form + +Bloggs, Fred + +and I think in theory I could have a real name + +"Fred Bloggs" which this would print without the quotes. + +For the other formats it is much less of a problem because the name and +address are clearly separated. + +I am happy with an answer of the form "for robust parseable results use a +structured format" which is what we say for search for example. + +I just thought I would mention it in case you thought the quoted form +was more useful for consumers. + +Best wishes + +Mark + + +> +> Patch 6 needs at least a review and patch 7 needs more discussion. +> +> Changes from v4: +> +> - patch changed to commit in commit messages +> - opt->format changed to format +> - Added comments to process_* functions +> - duplicite changed to duplicate +> - check_duplicate changed to is_duplicate +> - Deduplication was split into two commits: basic deduplication +> without a command line option and configurable deduplication with +> --fiter-by. +> +> Changes from v3: +> +> - `o' renamed to `opt'. +> - Conversion of --output from keyword to keyword-flags is now a +> separate patch. +> - Structured output formats print name and address separately. +> - Added test for --format=json. +> - Changed --filter-by default to nameaddr. In v2, the default was +> addrfold, in v3 the default was no filtering at all. I believe that +> Mark's suggestion to make nameaddr the default is good trade off. +> - Added new --output=count +> - Minor style fixes +> - Few typos fixed +> - There is no way to output unfiltered (duplicite) addresses. +> Hopefully, the introduction of --output=count is sufficient +> replacement for this "feature". +> +> Cheers, +> -Michal +> +> +> Jani Nikula (1): +> cli: Add support for parsing keyword-flag arguments +> +> Michal Sojka (6): +> cli: search: Refactor passing of command line options +> cli: search: Convert --output to keyword-flag argument +> cli: search: Add --output={sender,recipients} +> cli: search: Do not output duplicate addresses +> cli: search: Add --output=count +> cli: search: Add --filter-by option to configure address filtering +> +> command-line-arguments.c | 6 +- +> command-line-arguments.h | 1 + +> completion/notmuch-completion.bash | 8 +- +> completion/notmuch-completion.zsh | 4 +- +> doc/man1/notmuch-search.rst | 66 ++++++- +> notmuch-search.c | 388 +++++++++++++++++++++++++++++-------- +> test/T090-search-output.sh | 137 +++++++++++++ +> test/T095-search-filter-by.sh | 64 ++++++ +> test/T410-argument-parsing.sh | 3 +- +> test/arg-test.c | 9 + +> 10 files changed, 604 insertions(+), 82 deletions(-) +> create mode 100755 test/T095-search-filter-by.sh +> +> -- +> 2.1.1 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2