From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id iHTsEUxG5F7TNgAAsNZ9tg (envelope-from ) for ; Sat, 13 Jun 2020 03:21:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ONK/DUxG5F7FLQAA1q6Kng (envelope-from ) for ; Sat, 13 Jun 2020 03:21:48 +0000 Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E786E9404C5 for ; Sat, 13 Jun 2020 03:21:46 +0000 (UTC) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id A6E90C93E4 for ; Fri, 12 Jun 2020 23:21:43 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=6jRb7bL6VeK8iudSP3r3QLludJE=; b=IfSXSJ 9+Rsft1FvfA7VBKedwL2W+Nr9Rl+8hwqLhV6WabtYTdU+wtRrpXgzS8aXmjf123m oGdATOWyz8aF14dM/vRV0x2dLBx6ojyuEtvaGg7Zr2Bgeo/3TNzXKBGHlMiqh/fM bLbvZ+rRoxL5sOebc5SX0C0d9qmI4faaJr9Nc= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 9F54BC93E3 for ; Fri, 12 Jun 2020 23:21:43 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=iVCpwCxRA6M74rGEOE68IB4Q/1wg8zEuuicyg8QJBdo=; b=wUI8Gb8dgTZefFx+fSBTaqWotco0kgzsEMM5YrQHnckxWPWJozPXLUTqFX8SRSn+llO4UKD1WXNMCK/jOMhMSaEe/68RiJ2wZmAk4wMWHpBYI6QDmNeuhPm2RnhUWRBY9otplrdCLKok3J/b+ecKGO4bYW1WMvjNH9n5V90HqHM= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id F4182C93E2 for ; Fri, 12 Jun 2020 23:21:40 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: piem@inbox.kyleam.com Subject: Re: [PATCH] Support adding Message-Id to attached patches In-Reply-To: <20200612045523.18120-1-kyle@kyleam.com> References: <20200612045523.18120-1-kyle@kyleam.com> Date: Sat, 13 Jun 2020 03:21:39 +0000 Message-ID: <87wo4bps58.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: FFCABDF0-AD24-11EA-8296-B0405B776F7B-24757444!pb-smtp20.pobox.com X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=IfSXSJ 9; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=wUI8Gb8d; dmarc=none; spf=pass (aspmx1.migadu.com: domain of kyle@kyleam.com designates 173.228.157.52 as permitted sender) smtp.mailfrom=kyle@kyleam.com X-Spam-Score: -1.00 X-TUID: JiZ8LZR4b367 Kyle Meyer writes: > +(defcustom piem-add-message-id-header nil > + "Whether to add Message-Id header to non-mail patches. > +If this value is non-nil and a patch returned by a function in > +`piem-am-ready-mbox-functions' looks like a patch that was > +attached rather than sent inline, add a Message-Id header with > +the value of `piem-mid'." s/value of/value returned by/ > + (while (re-search-forward > + (rx "From " (>= 40 hex-digit) " Mon Sep 17 00:00:00 2001") This regexp should be anchored at the start of the line. > + nil t) > + (search-forward "\n\n") > + (forward-line -1) > + (insert (format "Message-Id: <%s>\n" mid))))) The From line above is very unlikely to be in the commit message and can't be in a diff line if the regexp is anchored. Still it's probably worth trying a little harder to check the surroundings.