From: David Edmondson Date: Thu, 30 Oct 2014 08:19:53 +0000 (+0000) Subject: Re: [PATCH] cli: notmuch search --duplicate=N is only supported with --output=files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=098682232a23c95bcc45d5604cce85c70e250cba;p=notmuch-archives.git Re: [PATCH] cli: notmuch search --duplicate=N is only supported with --output=files --- diff --git a/23/6f639328ad003fd8f7e71cca2dba1d2f9a1166 b/23/6f639328ad003fd8f7e71cca2dba1d2f9a1166 new file mode 100644 index 000000000..cfe7dcad0 --- /dev/null +++ b/23/6f639328ad003fd8f7e71cca2dba1d2f9a1166 @@ -0,0 +1,106 @@ +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 D9F81431FC7 + for ; Thu, 30 Oct 2014 01:20:02 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] + 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 TlsvqjIrk1OB for ; + Thu, 30 Oct 2014 01:19:58 -0700 (PDT) +Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com + [74.125.82.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + E7D50431FB6 for ; Thu, 30 Oct 2014 01:19:57 -0700 + (PDT) +Received: by mail-wg0-f42.google.com with SMTP id k14so5042381wgh.1 + for ; Thu, 30 Oct 2014 01:19:55 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:to:cc:subject:in-reply-to:references:user-agent + :from:date:message-id:mime-version:content-type; + bh=HUqr1yqiBnfc7yjaToIUpRgA2mV2xWBn6da+R2mpJNk=; + b=ieoOO5W23sOnmTDO9AV1bAl3dPO/D+vEBf2klY9GLDLXT/UDK3b1wRRGgJGbYOXCl5 + A1OHV5Q7rEVWVhU5rXX3Q0mwoIWa3E/vlhJsaGWOruP4GE4/EleL7xwQkBcfXKI70Kyi + 0FVcupLWmDrl9AT5hYpL3brFNlreNTNhnpHMHwPScvFoFvZKnNx3W7JOMN9LVUmMpvgF + YsdIMNlOITBqZyuyRYQAvn4ycd1qJ2f32pImVGX2PYS/SovzwNXMA75fQAcbYGxpNXie + o3SVZWzBYtfb0u/e28NjuX59X9NbxCdLpGC3p6zdRHzuFbfZ5hlnSnr97jzsx5TPuefL + CfQg== +X-Gm-Message-State: + ALoCoQn70u0XxPsO0bgL5MD9ONztI3p2ZAw7h74cgzCpbI0aEYXtaZ55qaZJ2NcMtCFQ/EHcOoJn +X-Received: by 10.194.216.162 with SMTP id or2mr18332831wjc.68.1414657195578; + Thu, 30 Oct 2014 01:19:55 -0700 (PDT) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by mx.google.com with ESMTPSA id + bv17sm21346014wib.13.2014.10.30.01.19.54 for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Thu, 30 Oct 2014 01:19:54 -0700 (PDT) +Received: from localhost (30000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id e5f5b7d4; + Thu, 30 Oct 2014 08:19:52 +0000 (UTC) +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH] cli: notmuch search --duplicate=N is only supported with + --output=files +In-Reply-To: <1414611043-3498-1-git-send-email-jani@nikula.org> +References: + <1414611043-3498-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-apple-darwin14.0.0) +From: David Edmondson +Date: Thu, 30 Oct 2014 08:19:53 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +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: Thu, 30 Oct 2014 08:20:03 -0000 + +This works, in so much as it doesn't allow the deranged behaviour. + +Consequentially, --duplicate seems a bit useless. Unless I feed it a +single id: as an argument (in which case I could use --output=files), I +have to figure out which of the files output are duplicates of each +other and which are from different messages. How is that useful? + +On Wed, Oct 29 2014, Jani Nikula wrote: +> Check the supported combination, and bail out for other combinations. +> --- +> notmuch-search.c | 5 +++++ +> 1 file changed, 5 insertions(+) +> +> diff --git a/notmuch-search.c b/notmuch-search.c +> index bc9be4593ecc..3bb5a7fbc885 100644 +> --- a/notmuch-search.c +> +++ b/notmuch-search.c +> @@ -387,6 +387,11 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[]) +> if (opt_index < 0) +> return EXIT_FAILURE; +> +> + if (output != OUTPUT_FILES && dupe != -1) { +> + fprintf (stderr, "Error: --duplicate=N is only supported with --output=files.\n"); +> + return EXIT_FAILURE; +> + } +> + +> switch (format_sel) { +> case NOTMUCH_FORMAT_TEXT: +> format = sprinter_text_create (config, stdout); +> -- +> 2.1.1