From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#58933: 28.2; project-buffers should take an optional filter Date: Fri, 04 Nov 2022 17:07:42 +0000 Message-ID: <87h6ze7in5.fsf@posteo.net> 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> <3AF36AF3-F7A4-4BEC-A5C2-E6F2C151EE26@toadstyle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35108"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58933-done@debbugs.gnu.org, Dmitry Gutov To: Sean Devlin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 18:08:33 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 1or0BD-0008uM-Pg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 18:08:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1or0Aw-0005BN-8V; Fri, 04 Nov 2022 13:08:14 -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 1or0Au-00059k-CH for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 13:08:12 -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 1or0Al-00089y-3f for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 13:08:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1or0Ak-0004fS-K9 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 13:08:02 -0400 Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2022 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 58933 X-GNU-PR-Package: emacs Mail-Followup-To: 58933@debbugs.gnu.org, philipk@posteo.net, spd@toadstyle.org Original-Received: via spool by 58933-done@debbugs.gnu.org id=D58933.166758167617924 (code D ref 58933); Fri, 04 Nov 2022 17:08:02 +0000 Original-Received: (at 58933-done) by debbugs.gnu.org; 4 Nov 2022 17:07:56 +0000 Original-Received: from localhost ([127.0.0.1]:54696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1or0Ad-0004f0-8e for submit@debbugs.gnu.org; Fri, 04 Nov 2022 13:07:56 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:41161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1or0AZ-0004ek-1E for 58933-done@debbugs.gnu.org; Fri, 04 Nov 2022 13:07:54 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 75E14240028 for <58933-done@debbugs.gnu.org>; Fri, 4 Nov 2022 18:07:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667581664; bh=yGptRce+8SwMQvGyHPjTmtqTIx/MNu5PbPyw6VVHVm8=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=nCs+3cNRTIozPJJ8xqRF/0Ua1UC7IsvWirEOKgp++bJ46LmRVB1Qt4JW9rLEhETHp voQycOvHZ4AahEatfZRjgpnhYGENY7nUlgn9tIvQ2NePaLzoMZpiLt5QVWm6F3FOqi /p/+jmyAjgvUwd5DQxSW7jP3hFDQH+1IWodYEs74mAHPHpVOG/oCiX650XQ5bek+oO N1g+EWeb8nAyJxVDHANIHRT+fJkDcfB+rqfxgcEnOndVleCjbQZkoTPIuXCMIDFYT2 /j8uTC0/BgsbI4Gha1L2fO+C2BnHg+9CadHbWAMqthUwjeBY66Xx+9UcYD72NWPtUp iz9twPDx2axkg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N3nB75RFtz6tr9; Fri, 4 Nov 2022 18:07:42 +0100 (CET) In-Reply-To: <3AF36AF3-F7A4-4BEC-A5C2-E6F2C151EE26@toadstyle.org> (Sean Devlin's message of "Fri, 4 Nov 2022 12:40:58 -0400") Autocrypt: addr=philipk@posteo.net; keydata= mQGNBGLfygUBDADVznbke6w0n9nE42xb+ZggbBy0IYRkkru/K+NA67523YTl2DoR2a5OMW90w7L9 KDtX2Mp34JN/6jVOSVC07VUbHVu6/exoGKixkiTpGhBPy5tUUJoxQKqLrzVQhN3fIyvg1oyHXKZm QGkUeevV0wjj4++xfjmcP235YvDh3TF8HC9t5KxIQIbhWnQm4ZyDkpWWS2CmdNttlj2+eH+51WLL bgx2bcwTmqrs079Q3hgF3yh44bBEmp9MgFjiZldOY2my0/ZSeucRxYmiM0vbJEBQgZV/MvA3gTxe 7ibV3ii7AyoYA8FiFDP98S/R2y5Nfq3ez9B7qeqtpSNseQHOU7h8Y5VV01a71ZszENAmbbwsldb9 j+HRLke7rn6mswDZl1qA/9ZFRzliFOdQtS1878XjraY+h5jfjvxaFVK23prGGVrrKv0LPWavoFUr nsjeHEZhYezBKhC2PwvRtXm01S3rkNbwm9pj0tfLSDW+1pT+6eZWptfQCXF2oEvgfKSTASUAEQEA AbQmUGhpbGlwIEthbHVkZXJjaWMgPHBoaWxpcGtAcG9zdGVvLm5ldD6JAdQEEwEKAD4WIQRxJuHe LwzjXHcL7QHyw8xRPbifZgUCYt/KBQIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAK CRDyw8xRPbifZkH+DACmCKmhrYgcv2i6dj3vRCVINaLtKUODTna/wAmP20WRKPhqvqvKNUx/wzpT aZrXIxpxOU2xawRWeHhWUktxS+W9L3xTACeR0gf5gomCxD9RuBTIohzWDkQt5rk8QwLqx5rAy5 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:247098 Archived-At: Sean Devlin writes: > 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 t= he >>>>>> buffers of interest. It would be useful if the function had an optio= nal >>>>>> argument to do this work. >>>>>> Project.el already has a function project--buffer-check that validat= es 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 functio= ns. (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 ad= ded >>>> 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= =99m > happy to wait for the new release.=20 I don't know what your workaround is, but since both functions (buffer-match-p, match-buffers) are self-contained, you can also just copy the current implementation into your local configuration. > Thanks both for your help, and feel > free to close this at your discretion. OK, done :)