From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Devlin Newsgroups: gmane.emacs.bugs Subject: bug#58933: 28.2; project-buffers should take an optional filter Date: Fri, 4 Nov 2022 12:40:58 -0400 Message-ID: <3AF36AF3-F7A4-4BEC-A5C2-E6F2C151EE26@toadstyle.org> References: <0EDC4306-3724-468F-8F0D-0470304A538D@toadstyle.org> <0540bf68-7419-f679-ef1c-fb4d8e978a4b@yandex.ru> <45027bdd-37ec-5a9e-0cb9-79f6d5df23fa@yandex.ru> <87fsezusgg.fsf@posteo.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.51\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_10D2C886-37C1-4AFF-9808-0B0156D275BD" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18807"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58933@debbugs.gnu.org To: Philip Kaludercic , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 17:42:22 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 1oqzls-0004Xd-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 17:42:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqzlb-0006Yn-Qp; Fri, 04 Nov 2022 12:42:03 -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 1oqzla-0006Xy-IA for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:42: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 1oqzla-0004Tn-9e for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqzlZ-0003zp-Vm for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Devlin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2022 16:42:01 +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.166758007815306 (code B ref 58933); Fri, 04 Nov 2022 16:42:01 +0000 Original-Received: (at 58933) by debbugs.gnu.org; 4 Nov 2022 16:41:18 +0000 Original-Received: from localhost ([127.0.0.1]:54685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqzks-0003yn-4y for submit@debbugs.gnu.org; Fri, 04 Nov 2022 12:41:18 -0400 Original-Received: from mail-qk1-f176.google.com ([209.85.222.176]:45587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqzkp-0003yY-Hr for 58933@debbugs.gnu.org; Fri, 04 Nov 2022 12:41:16 -0400 Original-Received: by mail-qk1-f176.google.com with SMTP id v8so3378690qkg.12 for <58933@debbugs.gnu.org>; Fri, 04 Nov 2022 09:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20210112.gappssmtp.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=fPz/zrubY/7adY8CW0qPTLfBdCg0sibCyz0aBDXSYAA=; b=d6FCKFqz49E6yeSGVbIhjHbjsiSB/aHPpFFa9+aZvo4A5CKS+qpuhuDaE/1r3wWcht PkyclRDE41qGCCMiOHO2kxoEbgTUMz+AGzKzBIXWJ2zH+fCc9O7PqUe7CwmPH1vJ94W4 hIloSkuBFMk6aGkm5ngIftdihPy48V+VvAnP6WVdmZ0nbHT0JY9k9k0pGKn2/tiyu0YX 7R3BQCTndoZT5DqKlKpcrlo5pokasnjrWCNw3sVLw8ulR2nAUOghfDMAgVhSYcoTP1Ci 21oWazAQRSX6AIdOuw/yvCFRQ4Qj2siU/CyOwZuTi0X6W7q/UhTWYw7ZEwEhMt94o9ag r5qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fPz/zrubY/7adY8CW0qPTLfBdCg0sibCyz0aBDXSYAA=; b=GruAYJdnNAjtg3XIOovblHvZY0laU1UMV2S4phWAi8JmEt0Z+uX9YaMdEKJsQCRoPO vQa2K1tGzkf1LsiNfpBDv07y/5p/0pDBCxgCEErB8pMjalAyvX9sv6HYw9F37HQ4MmL7 mrZ2yi9BBp7a47VquDrpFM5rQndnI+K6ltL7xtqQrYgjWz56NZERUNy0zZj/bHMyw5DD AdCtekkYdElFO3OP2i33aemTysLUgtNXnN6QzQj+rBL9VDFekM+3U9P/kvv2Kt660E/C BZFMgklAZEYVbDZN0Nhcp44ydzFGfiFWfS0YxWUuMRY6AEPq4hYfDub3fFxKoZkKOcoN t5aw== X-Gm-Message-State: ACrzQf1Z8SMs2Aux8fl/Y+KOuejKuYjczwq5aQGU1IcZ19/KtxAmTbZk tg/d5vcxzrp2gjq9EqUj+e30E80yWDW9GK85ncw= X-Google-Smtp-Source: AMsMyM6ogHkAnX+h+cejbQfiKuhX5Hs9CO/360X/q2596URg0a5u5O69XHks09MIEMdxZ8NeAb06Bw== X-Received: by 2002:a37:8ec1:0:b0:6fa:8040:8a4b with SMTP id q184-20020a378ec1000000b006fa80408a4bmr5631196qkd.782.1667580070037; Fri, 04 Nov 2022 09:41:10 -0700 (PDT) Original-Received: from smtpclient.apple (pool-173-56-106-162.nycmny.ftas.verizon.net. [173.56.106.162]) by smtp.gmail.com with ESMTPSA id q14-20020a05620a0d8e00b006e8f8ca8287sm3272457qkl.120.2022.11.04.09.41.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2022 09:41:09 -0700 (PDT) In-Reply-To: <87fsezusgg.fsf@posteo.net> X-Mailer: Apple Mail (2.3731.300.51) 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:247096 Archived-At: --Apple-Mail=_10D2C886-37C1-4AFF-9808-0B0156D275BD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi folks, > On Nov 4, 2022, at 2:47 AM, Philip Kaludercic = wrote: >=20 > Dmitry Gutov > writes: >=20 >> On 02.11.2022 16:17, Sean Devlin wrote: >>> Hi Dmitry, >>>=20 >>>> On Nov 1, 2022, at 7:38 PM, Dmitry Gutov wrote: >>>>=20 >>>> Hi Sean, >>>>=20 >>>> On 01.11.2022 00:04, Sean Devlin wrote: >>>>=20 >>>>> 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). >>>>=20 >>>> What do you think about these alternatives? >>> Thanks for the pointer=E2=80=94I wasn=E2=80=99t aware of these = functions. (I=E2=80=99m 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=E2=80=99t see these functions in my local installation of = compat >>> (056e3cc), but maybe definitions from Emacs 29 haven=E2=80=99t been = added >>> yet? In any case, I=E2=80=99m happy to wait a little bit. >>=20 >> Right, I'm not seeing it in there either. Perhaps it'll get there >> after Emacs 29 is released. >=20 > Right, Emacs 29 support is under development, but hasn't been = completed > yet: https://git.sr.ht/~pkal/compat/tree/emacs-29.1/item/compat-29.el. >=20 >> Philip, is that the plan? >=20 > The plan is to be ready by the time Emacs 29 is released. If possible > and I get to it, it might also be released earlier, but at the very > least I'll be waiting for the feature freeze later this month. That sounds good to me. I have a workaround in the meantime, so I=E2=80=99= m happy to wait for the new release. Thanks both for your help, and feel = free to close this at your discretion. --Apple-Mail=_10D2C886-37C1-4AFF-9808-0B0156D275BD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = folks,

On Nov 4, 2022, at = 2:47 AM, Philip Kaludercic <philipk@posteo.net> wrote:

Dmitry Gutov <dgutov@yandex.ru> writes:

On 02.11.2022 = 16:17, Sean Devlin wrote:
Hi = Dmitry,

On Nov 1, 2022, at 7:38 PM, = Dmitry Gutov<dgutov@yandex.ru>  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=E2=80=94I = wasn=E2=80=99t aware of these functions. (I=E2=80=99m 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=E2=80=99t see these functions in my local = installation of compat
(056e3cc), but maybe definitions from Emacs 29 = haven=E2=80=99t been added
yet? In any case, I=E2=80=99m 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.

Right, = Emacs 29 support is under development, but hasn't been = completed
yet: https://git.sr.ht/~pkal/compat/tree/emacs-29.1/item/compat-29.el= .

Philip, is that = the plan?

The = plan is to be ready by the time Emacs 29 is released.  If = possible
and I get to it, it = might also be released earlier, but at the very
least I'll be waiting for the feature = freeze later this month.

That = sounds good to me. I have a workaround in the meantime, so I=E2=80=99m = happy to wait for the new release. Thanks both for your help, and feel = free to close this at your discretion.

= --Apple-Mail=_10D2C886-37C1-4AFF-9808-0B0156D275BD--