From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sHBlM2wJNGS5eQEASxT56A (envelope-from ) for ; Mon, 10 Apr 2023 15:04:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oP1NMmwJNGTJGQEAG6o9tA (envelope-from ) for ; Mon, 10 Apr 2023 15:04:44 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (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 4A2C921FC5 for ; Mon, 10 Apr 2023 15:04:44 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 984135F3E4; Mon, 10 Apr 2023 13:04:39 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id C48965F366 for ; Mon, 10 Apr 2023 13:04:37 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 90FAD5FB95; Mon, 10 Apr 2023 09:04:36 -0400 (EDT) Received: (nullmailer pid 2313282 invoked by uid 1000); Mon, 10 Apr 2023 13:04:35 -0000 From: David Bremner To: Paul Wise , notmuch@notmuchmail.org Subject: Re: [PATCH] notmuch-mutt: replace extra command with notmuch-native thread search feature In-Reply-To: <28f564aaeee5bfe4dfd007850920eecbb19daba0.camel@bonedaddy.net> References: <20230407005452.2904978-1-pabs3@bonedaddy.net> <87355aob0e.fsf@minkowski.home> <28f564aaeee5bfe4dfd007850920eecbb19daba0.camel@bonedaddy.net> X-List-To: notmuch Date: Mon, 10 Apr 2023 10:04:35 -0300 Message-ID: <87leizga70.fsf@minkowski.home> MIME-Version: 1.0 Message-ID-Hash: 5BK2VMIGYXMG6P4OW4TYV2DJ6WAD2IW3 X-Message-ID-Hash: 5BK2VMIGYXMG6P4OW4TYV2DJ6WAD2IW3 X-MailFrom: david@tethera.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 X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681131884; a=rsa-sha256; cv=none; b=qgc/Gc2SWN5Sga9K//S+crlUet6RLzSTtWXBZUkW8EjkoYuJbmKSG/vGzTLPhgeUOdyVoG LsUmHsT//yhJCzsb45qCYV0WmJfrok2/rVNSlMmGtA+5vydYFl7Ae47rhLLyFcAfPt40eR zJNybRvlYTUN6dOzPjAhXYkJrTdrB9J+EvOsC2sh8RzQgE4zVucFcl0wfusK2JkFl3GeZZ rG0u5lOO/IKpQHFPKwK3JuQnwsgLZI7Skq8mEI5br/frI0p0fAh5ySfYJNw94T9WhxzErD Lz/GAqwAsl1ih3NyPA68Te+OT9LSSQYUbHOn/q/py8aX60UK3nT+MA73NX4b7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681131884; 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-owner:list-unsubscribe:list-subscribe:list-post; bh=iTJjhfJeHBQBfNL3djapGNmqyRgquS+qc8xzBgkX+Xk=; b=YVCQXrpOguPZ2zXsLOHak0tiYTWtvRD55HDmw1Idv8ucSWpp/0yUx49yjqMwIsvHadJ0dW uBFnbOrnHCFvii5+O/edBllFtZDXhu3Z6+KTxJmtfCBP34t2gYZGB9SSG71IC4n+hxk5mm 0KVsoLWmdSCLMe/sxRpdJaXdYUnCsJ15b5BuV+LvG2UtQP79e1Sf3mM8dzM0CPrdT6Lh4L JotcGN+5knDtVF/+9NtRabSCr4AsPtEY7CQIawqk+Keu2yAXuYQ7lVTbbIK4BQ4p358ELB 5xx1fcYa91WEcCqcywvn8rBxehFN/E/2SnG9iO+i6eIPVWn2sZue7uM7KRFzFA== X-Migadu-Spam-Score: -2.18 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -2.18 X-Migadu-Queue-Id: 4A2C921FC5 X-TUID: EDxp0qjEpSVz Paul Wise writes: > that changes the meaning of the query but I couldn't find any way to > prevent an arbitrary Message-Id from inserting parentheses into the > query. Also notmuch converts Message-Id (test)@hostname to just > @hostname in the Xapian database. I think that right now I am not sure > that re-implementing all the idiosyncrasies of notmuch queries and > Message-Id munging within notmuch-mutt is the way to go, especially > since Message-Id fields that intersect with notmuch features are rare. The code that does removal of spaces and () delited sequences goes back to Carl's 2009 implementation of manual header parsing (which we have mostly, but not entirely replaced with calls to gmime). It would probably be reasonable to disable that code (or maybe migrate to gmime parsing of message-ids?), but the cost/benefit analysis is not too clear to me. I had to look this up, but apparently parens mark a comment in RFC822 / RFC5322. If I understand RFC5322 correctly then comments are only permitted in the obsolete syntax, but I guess it makes sense to accept those. I don't know how many messages in the wild use this syntax; of the .01% in in my mail store, most don't put the comment inside the actual <> delimited message-id id, and those that do look like errors of various kinds - some unbalanced parens - some (null) indicating printf-ing null pointers