From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#58933: 28.2; project-buffers should take an optional filter Date: Fri, 4 Nov 2022 03:22:09 +0200 Message-ID: <45027bdd-37ec-5a9e-0cb9-79f6d5df23fa@yandex.ru> References: <0EDC4306-3724-468F-8F0D-0470304A538D@toadstyle.org> <0540bf68-7419-f679-ef1c-fb4d8e978a4b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10852"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: 58933@debbugs.gnu.org To: Philip Kaludercic , Sean Devlin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 02:52:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqlsY-0002WW-SW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 02:52:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqlrd-0007L5-QS; Thu, 03 Nov 2022 21:51:21 -0400 Original-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 1oqlQE-0005Xe-Nz for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 21:23:02 -0400 Original-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 1oqlQE-0004Vj-Fw for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 21:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqlQE-0005hl-4Q for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 21:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2022 01:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58933 X-GNU-PR-Package: emacs Original-Received: via spool by 58933-submit@debbugs.gnu.org id=B58933.166752493921860 (code B ref 58933); Fri, 04 Nov 2022 01:23:02 +0000 Original-Received: (at 58933) by debbugs.gnu.org; 4 Nov 2022 01:22:19 +0000 Original-Received: from localhost ([127.0.0.1]:51076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqlPX-0005gV-Gk for submit@debbugs.gnu.org; Thu, 03 Nov 2022 21:22:19 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:39921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqlPU-0005gH-LM for 58933@debbugs.gnu.org; Thu, 03 Nov 2022 21:22:18 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id o4so5108257wrq.6 for <58933@debbugs.gnu.org>; Thu, 03 Nov 2022 18:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=SnrIJuRFEYhpxBjDZoXdf21rUzvTZKNn5W4jnRUIIpM=; b=HdB2a1wLSCZC5iCHvF2kkwmsO/bVRmgt6ukHdiXOg60y4zEPm426xcpHA8+tT9YbNS E20jymXMEtN5BmyT39NcPwUqAzzMCfHGMmAbi7gI/QO6Y7tLgOQ+tPRHzNf6HFkVzt7a 5UNVGYGUmoVtAHaKGWoRYBW9kHcBynYTW2fDw4/VA5WfKvs7wj1vlK7EyJL5RTt+AFOm /sfZt6901PLzuBTL/B/wHdH9AEvyp9Xy/rO9bCZJlW/F6RENMIytHN00iVoCl4fKbVpD mEKyrxhKgvXBHBHTskEudO/lkYZqKUrOl0EiPW4Gf1kBvRQ9VFCUihEJ0zUWfoXas/F1 FeIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SnrIJuRFEYhpxBjDZoXdf21rUzvTZKNn5W4jnRUIIpM=; b=Zf4V0+w+Q6GjjFUaqS/9un9jz2SNJYHU2tqQKtSl9HtijkQugVWm7kwkgqd7pbFmYl vhxZ8KUZnSm4xjDhhGo+t33P1KsbSk+/w2lpk5yYlNIZkIcJwy3mrX4b3SElMGoMOcEH EgafSwlnm/71ceMbsQQ+QSJJEUj+HrwF5xgs/bFixOtMs7TpivZNMLytKKljfKnN9fnq EQP046MWuEVce3YInadrYeUqKLfR3zKtcbaEjPMuwsoiJpPl35KiyVv17RLt7kHE9sVd A5uNvoGaZ4kC1WosTXPEi6vzaYxqeteurjdN8k4WT4fDGNsNjiHwenclkYmQWa29MoV4 68pw== X-Gm-Message-State: ACrzQf3/BoTkvh2sKVN8hL0AIWXJ/YCbf0OqVic/2zGuenX+pblXCgsz 9IF2BH1i51GWBAcII8Vmp08= X-Google-Smtp-Source: AMsMyM5ctIhIdkryn9bXS7nJuJy3n4jLAgQvvWeVLzVrglRljw+0jpAF8afEALbuQ82blkI8DISuBA== X-Received: by 2002:adf:fc48:0:b0:238:d399:c55 with SMTP id e8-20020adffc48000000b00238d3990c55mr3168769wrs.683.1667524930949; Thu, 03 Nov 2022 18:22:10 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id bg15-20020a05600c3c8f00b003cf894dbc4fsm1525600wmb.25.2022.11.03.18.22.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 18:22:10 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247034 Archived-At: On 02.11.2022 16:17, Sean Devlin wrote: > Hi Dmitry, > >> On Nov 1, 2022, at 7:38 PM, Dmitry Gutov wrote: >> >> Hi Sean, >> >> On 01.11.2022 00:04, Sean Devlin wrote: >> >>> Project.el provides a function project-buffers that returns a list of >>> buffers associated with the given project. The list is unfiltered, >>> meaning any program using it will have to do some work to pick out the >>> buffers of interest. It would be useful if the function had an optional >>> argument to do this work. >>> Project.el already has a function project--buffer-check that validates a >>> buffer against a list of conditions. Maybe it should be wired into >>> project-buffers to do the job of filtering? >> There is also 'match-buffers' and 'buffer-match-p' in the core Emacs starting with Emacs 29 (should also be available with the 'compat' package). >> >> What do you think about these alternatives? > Thanks for the pointer—I wasn’t aware of these functions. (I’m still on 28.2.) > > It looks like these do fit the bill. For example, it looks like I could write: > > (match-buffers condition (project-buffers project)) > > I can’t see these functions in my local installation of compat (056e3cc), but maybe definitions from Emacs 29 haven’t been added yet? In any case, I’m happy to wait a little bit. Right, I'm not seeing it in there either. Perhaps it'll get there after Emacs 29 is released. Philip, is that the plan?