X-Envelope-From: notmuch-bounces@notmuchmail.org  Sun Aug 30 16:06:26 2026
Return-Path: <notmuch-bounces@notmuchmail.org>
X-Original-To: nmbug@yantan.tethera.net
Delivered-To: nmbug@yantan.tethera.net
Received: from yantan.tethera.net (localhost [127.0.0.1])
	by mail.notmuchmail.org (Postfix) with ESMTP id 6033D5F5BE;
	Sun, 30 Aug 2026 16:06:26 +0000 (UTC)
X-Greylist: delayed 541 seconds by postgrey-1.36 at yantan; Sun, 30 Aug 2026 16:06:23 UTC
Received: from mail.sindominio.net (mail.sindominio.net [IPv6:2a01:4f8:10b:1e2f::4])
	by mail.notmuchmail.org (Postfix) with ESMTPS id 3E1BD5E299
	for <notmuch@notmuchmail.org>; Sun, 30 Aug 2026 16:06:23 +0000 (UTC)
Received: from [127.0.0.1] (localhost [127.0.0.1])
	 by lesnaus.sindominio.net with ESMTP id 42C3112A02AB
	for <notmuch@notmuchmail.org>; Sun, 30 Aug 2026 17:57:13 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 lesnaus.sindominio.net 42C3112A02AB
Authentication-Results: lesnaus.sindominio.net;
	dkim=pass (4096-bit key; unprotected) header.d=sindominio.net header.i=@sindominio.net header.b="vJ1sdDKd";
	dkim-atps=neutral
Received: from mail.sindominio.net ([127.0.0.1])
	by localhost (lesnaus.sindominio.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ydkCjLQ0UIxC; Sun, 30 Aug 2026 17:57:10 +0200 (CEST)
Received: from [127.0.0.1] (localhost [127.0.0.1])
	 by lesnaus.sindominio.net with ESMTPSA id 7DD3112A012A;
	Sun, 30 Aug 2026 17:57:05 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 lesnaus.sindominio.net 7DD3112A012A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sindominio.net;
	s=mail; t=1788105430;
	bh=R7liRSmDa4jNVc5J2cuY9eK6GKHqqQ5UoHpwiKN1Cqs=;
	h=From:To:Cc:Subject:Date:From;
	b=vJ1sdDKdR/dLmD3g0e4Bh0Uf8a0gFs8rY0z+m3pFY8IDbp/Pn0cZYTVlCWTOAcX7Z
	 PYcsUx7rW7xWFqRmovT5Mt8MiBPRnF25tGP6g2e4ck0lj9SqVDwZgm5JJPoXRZyqP1
	 Y6IaLG5cu+8Kwn3bKkZYO0evJHcsr+gNbjyNgHDoqleX/FvP43GtobmOGL5z5meo0t
	 uqn5s2o7h5Udj/hyIhmJmj7BBQ3gDeKHFnUEhrwEFum3RLdmFCaUZPNyy2XDQ34WCQ
	 JB76fsxj23K7mQF7ZQtGc/GN0fUM0tXkCivD4XKqTlMVv2ivr9tKI/+sCBu6x6mUI/
	 r/uiJNkoMUf4rK2HhUHEmJzbNwPT9R1r0T6Cgs4pkeXox1N2tBHThUb5nZOgUBdKgS
	 aZnkYA0rTKOi0B2q2CwZd4Ip5mg8tpJKIaoMW3lPVDz3Fv6XpUeKd0xBYRsLaZ6EZ7
	 pjhl3niMYaov7WH/kYiAJOfzle1hhkSCRba6Iuu7l31k3Oxm71TPVYKayDYM9WGokN
	 Wsh98AgnolY5nCeAI1GzRhAI/vT95OtofwphXSqLiQId6At5cWx/icHAvRE452XKpx
	 9LSjE8xy6ZwszIOdWB+RvpnM7ZthAdS7mJt4B9Pi6EqSUPonyh/eXo0g7d8DDonD/l
	 BxUO/F5QlcGgEjVmhH2wSDbA=
From: inwit <inwit@sindominio.net>
To: notmuch@notmuchmail.org
Subject: [PATCH v2 0/3] cli: add --profile option
Date: Sun, 30 Aug 2026 17:44:24 +0200
Message-ID: <20260830155628.221888-2-inwit@sindominio.net>
MIME-Version: 1.0
Message-ID-Hash: FK6RQNCA3KJWTMWMMUZW6IEFYMBVVMNW
X-Message-ID-Hash: FK6RQNCA3KJWTMWMMUZW6IEFYMBVVMNW
X-MailFrom: inwit@sindominio.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: inwit <inwit@sindominio.net>
X-Mailman-Version: 3.3.3
Precedence: list
List-Id: "Use and development of the notmuch mail system." <notmuch.notmuchmail.org>
List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
List-Owner: <mailto:notmuch-owner@notmuchmail.org>
List-Post: <mailto:notmuch@notmuchmail.org>
List-Subscribe: <mailto:notmuch-join@notmuchmail.org>
List-Unsubscribe: <mailto:notmuch-leave@notmuchmail.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

The library has supported profile-based configuration resolution (via
the NOTMUCH_PROFILE environment variable) for some time, and all three
library entry points already accept a profile parameter. This series
exposes that functionality as a --profile=PROFILE CLI flag, making it
consistent with --config (which overrides NOTMUCH_CONFIG).

The design follows the --config pattern: parsed once in main() before
subcommand dispatch, rather than added to notmuch_shared_options. This
keeps it from appearing in every subcommand's --help output and avoids
redundant re-parsing.

Since v1 (20260509155257.2477368-1-inwit@sindominio.net):

  - renamed the profile variable from notmuch_requested_profile to
    profile_name, following config_file_name (review by David Bremner)

  - quoted shell variables in the new test helper functions (review
    by David Bremner and Tomi Ollila)

  - T035 count expectations are now derived from the corpus at test
    time rather than hard-coded; the previous hard-coded 52 was stale
    because the new subtests ran after subtests that add messages
    
inwit (3):
  cli: add --profile option
  doc: document --profile option
  test: add tests for --profile CLI option

 doc/man1/notmuch.rst     | 13 +++++++++---
 notmuch.c                | 21 +++++++++++++-----
 test/T035-read-config.sh | 46 ++++++++++++++++++++++++++++++++++++++++
 test/T055-path-config.sh | 25 +++++++++++++++++++++-
 4 files changed, 96 insertions(+), 9 deletions(-)

-- 
2.53.0

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org
