From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:203:375::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12.migadu.com with LMTPS id YVPuAo0EhWSjcQAATFOONw (envelope-from ) for ; Sun, 11 Jun 2023 01:17:33 +0200 Received: from mta1.migadu.com ([2001:41d0:203:375::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oC3vAY0EhWQK8QAA9RJhRA (envelope-from ) for ; Sun, 11 Jun 2023 01:17:33 +0200 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=1686439052; 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; bh=va3/F8+ZZL2QnqvQLoZD8oRqMLqn8bwRUG6iCZsvS7k=; b=YhEScVivQ6EgW7KAc3zxZy1CgN81pTehp3dWEmKVygf8Eh7pG90TV6FSALwE5j+/ocelVC VUQdCObt79n7dS2yei8w5ZwxArdTFd+0p5ndHdFH1hPjavceNOqZPDhlpo9qiCljur/aHK SCd1LelG0gigCxES6seLUOxw+d1DGpLtnf/2oC1YVGfpta7C1SI5cablR6McEfLEjeYhBv DPnxApQmnitu2pxOXM53y7EBsfehqoi/6Hs7wvKgUl/k6ghMKnOqHNRBbnB8nO2EO5sINX GdeGsxllz1DtjtZJqba1pfIJakIZ3J07pDbXPLhjWUvoXOmRWa7YF+CuuGnc/Q== From: Kyle Meyer To: jlicht@fsfe.org Cc: piem@inbox.kyleam.com Subject: Re: [PATCH v3 3/5] piem: Add piem-inbox-by-gnu-package-match In-Reply-To: <20230610095858.26982-4-jlicht@fsfe.org> Date: Sat, 10 Jun 2023 19:17:31 -0400 Message-ID: <87352y29h0.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-TUID: topvji8DBKD7 jlicht@fsfe.org writes: > +(defun piem-inbox-by-gnu-package-match (gnu-package) > + "Return inbox based on matching :gnu-package properties. > +GNU-PACKAGE should be a string. This function is intended to be > +used by libraries implementing a function for > +`piem-get-inbox-function'." > + (when gnu-package > + (catch 'hit > + (dolist (inbox (piem-merged-inboxes)) > + (let* ((info (cdr inbox)) > + (p-package (plist-get info :gnu-package))) > + (when (and gnu-package > + p-package > + (string-match-p (regexp-quote p-package) > + gnu-package)) Adjusted to use string-equal (on downcased values).