From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SOhOCK0GiGDLagAAgWs5BA (envelope-from ) for ; Tue, 27 Apr 2021 14:42:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aPrzA60GiGCiSAAAB5/wlQ (envelope-from ) for ; Tue, 27 Apr 2021 12:42:21 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6676C27A0D for ; Tue, 27 Apr 2021 14:42:19 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 623112716D; Tue, 27 Apr 2021 08:42:15 -0400 (EDT) Received: from mailproxy01.manitu.net (mailproxy01.manitu.net [217.11.48.65]) by mail.notmuchmail.org (Postfix) with ESMTPS id 82D501FBD2 for ; Tue, 27 Apr 2021 08:42:12 -0400 (EDT) Received: from localhost (200116b86079db005d2a603ad4c81930.dip.versatel-1u1.de [IPv6:2001:16b8:6079:db00:5d2a:603a:d4c8:1930]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy01.manitu.net (Postfix) with ESMTPSA id CB68012603DD; Tue, 27 Apr 2021 14:42:09 +0200 (CEST) MIME-Version: 1.0 In-Reply-To: References: <87lf992o99.fsf@tethera.net> Subject: Re: Two perceived query language imbalances To: Alexander Adolf , David Bremner , notmuch@notmuchmail.org From: Michael J Gruber Message-ID: <161952732917.12126.15004755786676144921.git@grubix.eu> Date: Tue, 27 Apr 2021 14:42:09 +0200 User-Agent: alot/0.9.1 Message-ID-Hash: DRBWEOMZKXBCADEFK5ZJ6R7VNXTRKDPA X-Message-ID-Hash: DRBWEOMZKXBCADEFK5ZJ6R7VNXTRKDPA X-MailFrom: michael@grubix.eu 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619527339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FaVkl3R9X2VcqYAaB/BL+VNkpYCt6OzUCVT8GiQzqIA=; b=cEkL/EmAXCQqclR6cf0TkeuZdYqs4kKNjK3roganBOhp+wxdogDC2DpHZiTg0jt589W38x 5e25rXwXxQ2UuXwgRZFEr1xvsEZ7fBwTn5Z2qzYfvekqgxumvw8vkovJ2Cot7NfsE2ytvO Rqe4c8x42qmU4rCph2oY7oBOJko8YbrW9QlvtZfgmmCXqyYxsVT92gPMM7A13UMh3lN2WP 0hAxPCh3AK6eK1pHHaagqr7mlcK7DwFV580sWJMv4Cd3nZALdHq5pjlmOwSS25BpwV2w+W 1SdlSxqhl2kJ3HcIzzHa/jC0gojmxQ1005j7r0igjimbo5Z9qNsYbhknQ2dPig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619527339; a=rsa-sha256; cv=none; b=VT4ePFyqUk7dG73ryOn0MvDHAM03oY/5ve54VAthv1jXAWeuPfbTEVEo91tmo5lOB/UYTH 4hFPwnBDbszY/iMiN9LiOtefIyb1D8bN8/Fv5bI3dua3K6kjv+F2iZnI+1VSuU0OhN6t9g BzVu6h6IpWXTJB3q5C+a7ZFtY3d0/PsgQT2KHGaxX1Md7UPDLuntUj1dRLl+copMXEsolB 4XHlnwtgONROkoknAK9PaD+QNXiSqaCYbk2W3IuAHo3QTl58o8ut9GVllg3i/IHBZ5CUwY LOMg4Bnpexla/5eoEMnbGMjLUDBbPUccXJaiD0VTZxFO8ZyX8tzU1n6JhUlYtA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.09 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 6676C27A0D X-Spam-Score: -1.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: ejWMogsAF1Bi Alexander Adolf venit, vidit, dixit 2021-04-27 13:34:03: > Hello David, [...] > >>> id: or mid: or mid:// > >>> For id: and mid:, message ID values are the literal contents of > >>> the Message-ID: header of email messages, but without the '<', > >>> '>' delimiters. > >> > >> Similar thing here: "id:" and "mid:" can be used interchangeably, except > >> for regex search. Adding "id:/regex/" would seem most useful to me. > >> > > > > This was intentional, to avoid breaking existing scripts / internals > > that rely on treating id: as the primary key for the database. At least > > that was the concensus when we added it. It seems like one answer would > > be for you to just use mid: all the time, since it already has the > > behaviour you like. > > [...] > > I see, thanks for the insight. In that light, what would be your take on > featuring "id" less prominently in the documentation, so as to foster > the sole use of "mid" for all new script developments? > > You could maybe even go as far as marking "id" as "deprecated and kept > for backwards compatibility with legacy scripts only"; but without > actually ever removing it, of course, since as you say it's needed for > internal purposes. In that case, I suggest that `notmuch search --output=messages` outputs message ids in the form `mid:...`, as well. Users can discover `--output=messages` from command completion and could learn the "right" search prefix from the command output. Regards Michael