From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:863f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id 4EFpKfgqdmHWPgAAsNZ9tg (envelope-from ); Mon, 25 Oct 2021 03:56:40 +0000 Received: from out1.migadu.com ([2001:41d0:2:863f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qBI+JfgqdmHBCQAAB5/wlQ (envelope-from ); Mon, 25 Oct 2021 03:56:40 +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=1635134200; 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=HhmyqD3sTojhnnUTrPc0Kz3RgkO9QTsk9cU/R5WVpf8=; b=vz5mArXbDmUS3Vp07cUHihhuprO7szOHj+Huq9j/Z5w95OqxGoewHZBlDRBObABb8lxgBK FZ+ufLPjIxx072CYE4AyL3cX+mFYa5JNOteJ1AVS7IloGEEGoHb2nWnF88FgQqx1Nfzkla 3nPGAI4wgf6OFSlKhozf8aI4F/d8QfNeTTeojdrKtMye7f3YPICHPGXqkoPgW3odr7XABb u/IDtv8rWwCEzLZXaEzoyw39XwUjTZmjBj0CiI2nR28OvqDRz9U5xu3MgewPAvp4ejtfRz l5iVQoDaVPmpxINtwtDV8xdty2P5SmHPoM1m2kkDHSwxonQf3g62MZth2yuDiA== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH 02/10] piem-lei-known-mid-p: Use with-output-to-string Date: Sun, 24 Oct 2021 23:56:22 -0400 Message-Id: <20211025035630.297598-3-kyle@kyleam.com> In-Reply-To: <20211025035630.297598-1-kyle@kyleam.com> References: <20211025035630.297598-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: SG5KzJPVCZ+p piem-lei-known-mid-p does essentially the same thing as piem-notmuch-known-mid-p, so collect output in a consistent way. --- piem-lei.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/piem-lei.el b/piem-lei.el index 611b3243..6fb659c9 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -579,10 +579,10 @@ (defun piem-lei-known-mid-p (mid) "Return non-nil if MID is known to lei. The message ID should not include have surrounding brackets." (not (string-empty-p - (with-temp-buffer - (call-process "lei" nil '(t nil) nil - "q" "--format=ldjson" (concat "mid:" mid)) - (buffer-string))))) + (with-output-to-string + (call-process "lei" + nil (list standard-output nil) nil + "q" "--format=ldjson" (concat "mid:" mid)))))) (defun piem-lei-mid-to-thread (mid) "Return a function that inserts an mbox for MID's thread." -- 2.33.1