From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id 2MyKDJAmwGHHYwAAsNZ9tg (envelope-from ) for ; Mon, 20 Dec 2021 06:45:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ICU/CJAmwGGRfQAAbx9fmQ (envelope-from ) for ; Mon, 20 Dec 2021 06:45:36 +0000 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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 E072D3073B for ; Mon, 20 Dec 2021 07:45:32 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 9EE0F5C0131; Mon, 20 Dec 2021 01:45:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 20 Dec 2021 01:45:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=LsTuKcg7BJ21ylc1wqU1ltas+I AgjOCVzfDu9HLhT8s=; b=BchRzOZWQ1d+bu6GWUKxcp/Z8iYIAYoBMOKn48qg/1 Dk3I9xMy6Vh4ct56Z5bE2NrO2FCsTNr1j213YnvxHGt3+giRm3INiD2CcX0ru/da 2qubon3TK9aAoIPk7rpjVXBg6MTtAzkyTSV2Gyo5MWHvRkAufQxXLtpI+hnD//+b XBlRHEN8E2mhpehRsj49QUG0PWEUJiEilqr1qz+K6JMIXc2tTGtGJm+kBnj5GijG KzHVASf+52ybL59F4G8n0CqGT9ewYI7MibuC4dqB9QouK/U50btdst+kiUNxUwkK S3Kt3hDqYB4HeOZV7EoR0GHTLtwQMZGJp3/BxnU92ISg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=LsTuKc g7BJ21ylc1wqU1ltas+IAgjOCVzfDu9HLhT8s=; b=ZVo/ILtjHZT5PbEPVpfca+ voGn9k4yknl/Upyu3WVbST24n3lHjd+zYJ6lrvM7L/47pFDXHs6GjXo9Tgrf4rA4 qK26/S/HVVytQdIV/esFO579ABgcdbq+EwwLL9vkbR+roZ6hji1T/BxUGnrkP8J6 PtKgsHkA6mygQ6vXn8FuDlXHzCxqPYnubE33sUEiNbvP3sff1tLrAfLdO0DkgG4g KyvPTKOdv5qLpg95nNYnjCeyidYkCDI843/JSQdd2K8VfqvY+RYDVcS5oSAHa0Kf uq5tCVbOzMOgpe9uAszJPYkic8A/z22qI25j53KfqQOauGmqqO0XE+l9+bdSedgA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtuddguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeeuhfdtieeuueejhffhieffgfejhedvgefhueehveevleef udejveefteetieelvdenucffohhmrghinhepvghlrdihohhunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihh ihhtthhonhdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Dec 2021 01:45:29 -0500 (EST) Received: by melete.silentflame.com (Postfix, from userid 1000) id 9650A7F66A1; Sun, 19 Dec 2021 23:45:28 -0700 (MST) From: Sean Whitton To: Leo , Kyle Meyer Cc: piem@inbox.kyleam.com Subject: Re: [PATCH 1/1] Use notmuch-extract-patch if available In-Reply-To: <871r2f770q.fsf@student-228-110.eduroam.uu.se> References: <20211209204319.168897-1-sourcehut@relevant-information.com> <20211209204319.168897-2-sourcehut@relevant-information.com> <87mtl66ckv.fsf@kyleam.com> <871r2f770q.fsf@student-228-110.eduroam.uu.se> User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Sun, 19 Dec 2021 23:45:28 -0700 Message-ID: <87lf0fn59z.fsf@melete.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1639982736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LsTuKcg7BJ21ylc1wqU1ltas+IAgjOCVzfDu9HLhT8s=; b=nXu4r3xbEF7jQ8QDIP91yK4BCsGADfxMRkGIoXxsEz3vhTKqnwYFAmNSoiBaGnwp9KiS5r VmrCmLDziiuOf+s8vlYHQLcLci3LaP12JZxxhgTWBtZPscjrq4xFRZAarE4WBawhBpTNE2 0a75tSgr62fnlsHNJRDLK4Y643Nns5h3GIsymMfMFD8WfjD20RZbXDLFYa3ixgdIPp8sqb hKqTBLLhdY5x43HuqAq0PYsQ2xb1Bn9iBMS9tUknAsBylmYB2YywjOc6np9XdODGgauHd+ Br9JimoRwBCbuKFDP8ri9cFjJ51liYvQI7snn3b0wlHRwgg4sri1PPp+q+uQzA== ARC-Seal: i=1; s=key1; d=kyleam.com; t=1639982736; a=rsa-sha256; cv=none; b=UUo5hrWbMer90P7GxWg05D9uqi9I0i5WpIf1bSchIIxYJM6jCmxPpQtTDoS4KZz2eQahMU fRHTpE7th/7hbFRZoPQ0IMoVfSB+yz0lKNVAi3XUNvEjk1zEbBKc/5n+mvuvgM/6hMnsKa kMLMlEva2U+79C4QxiUi5LmOrCrwnYefQ3L+SALkEVf1eata+XTKxP4/MkAt5NDE5J3NCN f53TPaN5iL3l5JKgWmNh6Bdozm1TpayFmWJxrdhjv6xwdKfqZmysjfsULFrGbkCNZEB8vG I9DehCjOAV1NK8tgu1HZtEHnymMsR6qwrO3KZ5DuQAHBsk3SDI1EZAWvKiBHRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=spwhitton.name header.s=fm1 header.b=BchRzOZW; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="ZVo/ILtj"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of spwhitton@spwhitton.name designates 66.111.4.27 as permitted sender) smtp.mailfrom=spwhitton@spwhitton.name X-Migadu-Spam-Score: -7.67 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=spwhitton.name header.s=fm1 header.b=BchRzOZW; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="ZVo/ILtj"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of spwhitton@spwhitton.name designates 66.111.4.27 as permitted sender) smtp.mailfrom=spwhitton@spwhitton.name X-Migadu-Queue-Id: E072D3073B X-Spam-Score: -7.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: vxcOFDArCBAq Hello, On Tue 14 Dec 2021 at 12:36PM +01, Leo wrote: > Kyle Meyer writes: > >> sourcehut@relevant-information.com writes: >>> + (if-let ((cmd (executable-find "notmuch-extract-patch")) >>> + (tid >>> + ;; If `notmuch-show' was called with a notmuch query rather >>> + ;; than a thread ID, as `org-notmuch-follow-link' in >>> + ;; org-notmuch.el does, then `notmuch-show-thread-id' might >>> + ;; be an arbitrary notmuch query instead of a thread ID. We >>> + ;; need to wrap such a query in thread:{} before passing it >>> + ;; to notmuch-extract-patch(1), or we might not get a whole >>> + ;; thread extracted (e.g. if the query is just id:foo) >>> + (if (string= (substring thread-id 0 7) "thread:") >>> + thread-id >>> + (concat "thread:{" thread-id "}")))) >> >> I believe this comment and (if ...) is coming straight from >> mailscripts.el. You note in the cover letter that some of this is >> copied from mailscripts.el, but I think there should be a code comment >> as well. >> >> However, I don't really understand why the condition is necessary. >> Wouldn't always using >> >> thread:{notmuch-show-get-message-id return value} >> >> work? > > I don't actually know, maybe Sean Whitton knows? I guess if you are using the function notmuch-show-get-message-id rather than the variable notmuch-show-thread-id, then it sounds like just wrapping that in thread:{} would work. But it has been some years since I figured out that code, I'm afraid. -- Sean Whitton