From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#59935: 29.0.60; project-list-buffers is slow Date: Sat, 10 Dec 2022 19:45:09 +0200 Organization: LINKOV.NET Message-ID: <86a63vi2lu.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30234"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 59935@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 10 18:48:47 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 1p43xv-0007gp-1I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Dec 2022 18:48:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p43xI-0002wa-2k; Sat, 10 Dec 2022 12:48:08 -0500 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 1p43xD-0002vi-GH for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 12:48:03 -0500 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 1p43xD-0002Tq-8V for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 12:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p43xD-0001aX-4W for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 12:48:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2022 17:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59935 X-GNU-PR-Package: emacs Original-Received: via spool by 59935-submit@debbugs.gnu.org id=B59935.16706944485935 (code B ref 59935); Sat, 10 Dec 2022 17:48:03 +0000 Original-Received: (at 59935) by debbugs.gnu.org; 10 Dec 2022 17:47:28 +0000 Original-Received: from localhost ([127.0.0.1]:44188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43we-0001Xf-4d for submit@debbugs.gnu.org; Sat, 10 Dec 2022 12:47:28 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:44587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43wa-0001XJ-7i for 59935@debbugs.gnu.org; Sat, 10 Dec 2022 12:47:24 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id DAC651C0003; Sat, 10 Dec 2022 17:47:17 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Sat, 10 Dec 2022 03:49:47 +0200") 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250539 Archived-At: > Not sure what's the best fix here (especially in time for the release), > but if the FILTER-PREDICATE arg to list-buffers-noselect turned into a > factory function (e.g. FILTER-PREDICATE-MAKER), that would be one > solution. I see only one solution: to replace the argument FILTER-PREDICATE with BUFFER-LIST-FUNCTION. >> Curiously, though, it shows a different list of buffers. It also >> includes "hidden" buffers - diff-syntax, Echo Area, etc. We should look >> into that either way. > + (cl-delete-if-not > + (lambda (b) > + (or (buffer-file-name b) > + (string-match-p "\\`[^ ]" (buffer-name b)))) > + (project-buffers pr))))) Please try to copy the exact logic from list-buffers--refresh: (and (or (not (string= (substring name 0 1) " ")) buffer-file-name) (not (eq buffer (current-buffer))) (or file (not Buffer-menu-files-only))