From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SNM8Ftz3rWNd9QAAbAwnHQ (envelope-from ) for ; Thu, 29 Dec 2022 21:26:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SHUiFtz3rWNhXAEA9RJhRA (envelope-from ) for ; Thu, 29 Dec 2022 21:26:04 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 229292191 for ; Thu, 29 Dec 2022 21:26:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAzSd-00074p-54; Thu, 29 Dec 2022 15:25:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAzSZ-00072t-ML for guix-patches@gnu.org; Thu, 29 Dec 2022 15:25:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAzSZ-0005fB-CE for guix-patches@gnu.org; Thu, 29 Dec 2022 15:25:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAzSZ-0007Rv-8F for guix-patches@gnu.org; Thu, 29 Dec 2022 15:25:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60410] [PATCH 4/7] messages: Remove unused set intersection feature in search-bugs. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 20:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60410 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60410@debbugs.gnu.org, Ricardo Wurmus Cc: Arun Isaac Received: via spool by 60410-submit@debbugs.gnu.org id=B60410.167234545628526 (code B ref 60410); Thu, 29 Dec 2022 20:25:03 +0000 Received: (at 60410) by debbugs.gnu.org; 29 Dec 2022 20:24:16 +0000 Received: from localhost ([127.0.0.1]:33001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAzRo-0007Pv-7r for submit@debbugs.gnu.org; Thu, 29 Dec 2022 15:24:16 -0500 Received: from mugam.systemreboot.net ([139.59.75.54]:60032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAzRk-0007PQ-RN for 60410@debbugs.gnu.org; Thu, 29 Dec 2022 15:24:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QNJrLPaNEoGu50FEJK41fDz1nLktxCISk/UjPdlprD4=; b=CGQ6dOXGmeWB2hivDBM21Qx3Au uEwiR6JtbIy5c7NAQqV6SXPlTKHK4CI+OiNewIjVoRut9MO0fSnuoR15fLkMhSdkwIXBtMLHwh4Ac o7HvFlKzcpR1OKUXCX62FRZzbGGMAemJkCI9VwcmO8GVIMVZ1OpztwKxbBfQujTUcrlPZZN96qYya SeO/JaN3N4vifaMiebDqcCxudjVINlJe35uaKVdrwI+9VUqHIsinxjpLw1Eu4QqjSGIenkWVsBi0v ft+bm1yvGEmukwh1npykp5YxF6DRuUS6cVCUe4POz56gt037rTknj9STuQLx8rTZcUPtxYK3XXuHz +a4YDX5A==; Received: from [192.168.2.1] (port=38338 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pAzRi-000oIe-09; Fri, 30 Dec 2022 01:54:10 +0530 From: Arun Isaac Date: Thu, 29 Dec 2022 20:23:57 +0000 Message-Id: <20221229202400.28565-4-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221229201809.27997-1-arunisaac@systemreboot.net> References: <20221229201809.27997-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672345564; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QNJrLPaNEoGu50FEJK41fDz1nLktxCISk/UjPdlprD4=; b=etFW82l865zieFhtVDsqq75tnOzdWnsd9E3Uyp0qBhGPG9+nZ6S6E+Xam7g4M4NJdF3JFP 54SLQuvjzkwNeHA9lJGC+hVoTfaE7v24ggZWx96j/KHuYox4c9Ilj+2S1wpHK/JRbwMgbb gaTxMGj+FWsgKUj6OhGdQ3eFEabhUDgfuvGGMlMGuQUCA9LdllQBUt7Zhe1MkOwc+79Qom nZjyTz8c6Ahcy1ANAfxynsSgW9YpdolpW/ne/8EElQfCdQ1fkzDdXZi4xuus2jwe5pvMY0 S1KtPGPKpJQwY9lrC/G1aUtsThGZqGOCOdPzmAsXelL1blxJjVbMkJeReNyhwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=CGQ6dOXG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672345564; a=rsa-sha256; cv=none; b=QjMkHXaiKn6oat2D1fxQ2Jrc7y+8WAxSafKe6ZsNSaC+Q/yymbv4Dr7uIb0P9MkQ+6KEZ5 vOdl+jWmvWkSrqy3+GTc+O7Tgnq3h1rDJUn6Om57DAf7dlW8GxedpQ1QXpHn4lmhaVQKzT R0fd8+WsYYJnpGCgFs32FzHVwNMKE97gULuonJ1ZBlXR5+HEpq69B7fE4EV6iH85T6qHNm SU5hsNF0jrA/gNPAVTI4xmuJx0d8q9zJJCjWwuke2N4YmDmdBQ88Usqc2dAR29Is994Qo/ ZCnDJxtfidrG/5aLXxLAS+8v5QHivL0V18ZwyPPCtiZjIvNw02yqbvTGxkvwgA== X-Spam: Yes X-Migadu-Queue-Id: 229292191 X-Migadu-Spam: Yes X-Spam-Score: 8.47 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=CGQ6dOXG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none) X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 8.47 X-TUID: WDrikztaJgS9 * mumi/messages.scm (search-bugs): Remove unused set intersection feature. --- mumi/messages.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/mumi/messages.scm b/mumi/messages.scm index fb305bb..75ac3b1 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -1,6 +1,6 @@ ;;; mumi -- Mediocre, uh, mail interface ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus -;;; Copyright © 2018, 2019 Arun Isaac +;;; Copyright © 2018, 2019, 2022 Arun Isaac ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU Affero General Public License @@ -250,16 +250,12 @@ PATCH-SET. If PATCH-SET is not provided, return all patches." message-numbers) "\n"))) -(define* (search-bugs query #:key (sets '()) (max 400)) - "Return a list of all bugs matching the given QUERY string. -Intersect the result with the id sets in the list SETS." - (let* ((ids (map string->number - (search query))) - (filtered (match sets - (() ids) - (_ (apply lset-intersection eq? ids sets))))) - (status-with-cache (if (> (length filtered) max) - (take filtered max) filtered)))) +(define* (search-bugs query #:key (max 400)) + "Return a list of all bugs matching the given QUERY string." + (let ((ids (map string->number + (search query)))) + (status-with-cache (if (> (length ids) max) + (take ids max) ids)))) (define (recent-bugs amount) "Return up to AMOUNT bugs with most recent activity." -- 2.38.1