From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:aacc::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id WNAyBEPpu2AFdwAAsNZ9tg (envelope-from ); Sat, 05 Jun 2021 21:14:43 +0000 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id GP46BD/pu2CqFwAA1q6Kng (envelope-from ); Sat, 05 Jun 2021 21:14:39 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1622927678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TxhO6d5hig1oeAzaqwaziRJmWWv/wtd4NTSYkcP4c/U=; b=fcQwkFN114vB+ixJtHmVJyA9uuOXsVv+zmVp8VMAWnITyO6vC3NvtkEPrgtmKyRFFJQqIF geBzN+mn+pQ6BfE9lBfhDPJ26Va7VCVrXp0/sWob7OcWaWv+KsptzwmmO34tGUkDmFLGHl G9cwrADUXN5oO+mMmCimpJcNEPEnpWtPYuhdNFQhlvezMFrNZytm4T+EkXZuOYHHln5xFQ aV7bt+YX3QipEWzTMLKRqCO0E3DhO25iOASigBZgIFOh/E7nZmCocYCgaVPkHgfbGBXMIt npoaUdCL7f0/KviXi5zLLldEK3TIP0gSs/BW+3Oag53bolgG/zmsjEHQ9MbaKA== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH 10/18] piem-lei-query-thread: Deal with multiple "re:"s Date: Sat, 5 Jun 2021 17:13:54 -0400 Message-Id: <20210605211402.20304-11-kyle@kyleam.com> In-Reply-To: <20210605211402.20304-1-kyle@kyleam.com> References: <20210605211402.20304-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyle@kyleam.com X-TUID: Kwdfn0KoyWht piem-lei-query-thread strips a message's subject of "re: " before checking matches the previous line's subject and should be dropped. "re: re: " unfortunately don't seem uncommon, so strip multiple "re:"s. --- piem-lei.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/piem-lei.el b/piem-lei.el index 43ab01ee..cf19195b 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -387,7 +387,8 @@ (defun piem-lei-query-thread (mid) (let* ((data (cdr (assoc mid-msg records))) (subject (let ((case-fold-search t)) (replace-regexp-in-string - (rx string-start "re:" (one-or-more space)) + (rx string-start + (one-or-more "re:" (one-or-more space))) "" (string-trim (cdr (assq 's data))))))) (insert -- 2.31.1