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 33450431FD2 for ; Sat, 1 Nov 2014 04:30:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 0bykIjZrjRNr for ; Sat, 1 Nov 2014 04:30:53 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A63B6431FAF for ; Sat, 1 Nov 2014 04:30:52 -0700 (PDT) Received: by mail-la0-f44.google.com with SMTP id gf13so7518393lab.3 for ; Sat, 01 Nov 2014 04:30:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zZsqh5Nz8uol2/SuV1QivkDVHs8L+uZNjvI0FdMbWyg=; b=NZEuDYpawmG1ATP0jXp1bymr7i339m8jHR8k68QctihNVQi0LTNkZfjmRa4GzundtF K8A8+CFlJTOc7ai+CNJrpENw+IIPoRk+vsWSzXxlWgywe8Zw+SJvUP1EVHsCpBTrYLfY PyOpQzIMITq1FFbDuDHP1Ue0hX7zabT4C3YdHNSBcfevaUgTONPJSc6ph2DUYcQSs1D5 14eAQ4mO+2T4CmeqiV+gHEXezHQSkw+a/E8Qt8nXg/AXXb5hLLEW6muOBCGzsyguMLz/ 16G6ZXQFyRPqnJzKMXsDyLdhOaz8ElrycmEsNxzIaKVJcc2h68FnjZAVwYZ/tEpZkXqR lveA== X-Gm-Message-State: ALoCoQk7RwTgB1PXElx+Sr6SDrgCUEca4GijUL2WTDDWwyMkVkYSkuiTxkB+pG2wM1drlVBdbgdP X-Received: by 10.113.5.7 with SMTP id ci7mr33664147lbd.9.1414841450887; Sat, 01 Nov 2014 04:30:50 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36d-48.dhcp.inet.fi. [88.195.109.48]) by mx.google.com with ESMTPSA id g5sm5528456lam.1.2014.11.01.04.30.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Nov 2014 04:30:50 -0700 (PDT) From: Jani Nikula To: Michal Sojka Subject: [RFC PATCH 0/2] cli: split 'notmuch address' from 'notmuch search' Date: Sat, 1 Nov 2014 13:30:46 +0200 Message-Id: X-Mailer: git-send-email 2.1.1 In-Reply-To: <87egtn2s4z.fsf@steelpick.2x.cz> References: <87egtn2s4z.fsf@steelpick.2x.cz> 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: Sat, 01 Nov 2014 11:30:57 -0000 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. 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