From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers Date: Tue, 12 Dec 2023 23:43:47 +0000 Message-ID: <87y1dzvvf0.fsf@localhost> References: <878r919qfh.fsf@localhost> <87lecp84mf.fsf@localhost> <83ttrdx8j9.fsf@gnu.org> <87a5su261p.fsf@localhost> <838r8e24yy.fsf@gnu.org> <87y1gezspg.fsf@localhost> <834jj21z05.fsf@gnu.org> <87il7izo4l.fsf@localhost> <831qe61xrh.fsf@gnu.org> <87cyxqzmhh.fsf@localhost> <83zg0uzlgw.fsf@gnu.org> <87v8bhxzcu.fsf@localhost> <83y1gdxws8.fsf@gnu.org> <87jzrwm7ul.fsf@localhost> <87h6n0m781.fsf@localhost> <87v8935wik.fsf@localhost> <83msuftr0i.fsf@gnu.org> <87plzbxtxa.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29804"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , Eli Zaretskii , 66117@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 13 00:42:03 2023 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 1rDCO2-0007Yu-UE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Dec 2023 00:42:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDCNo-0006kF-97; Tue, 12 Dec 2023 18:41:48 -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 1rDCNm-0006jq-Ev for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 18:41:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDCNm-0003Jc-6e for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 18:41:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDCO1-0005EW-Pi for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 18:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Dec 2023 23:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66117 X-GNU-PR-Package: emacs Original-Received: via spool by 66117-submit@debbugs.gnu.org id=B66117.170242447320057 (code B ref 66117); Tue, 12 Dec 2023 23:42:01 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 12 Dec 2023 23:41:13 +0000 Original-Received: from localhost ([127.0.0.1]:57930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDCNE-0005DQ-NJ for submit@debbugs.gnu.org; Tue, 12 Dec 2023 18:41:13 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:46533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDCN8-0005Ce-JY for 66117@debbugs.gnu.org; Tue, 12 Dec 2023 18:41:11 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 08B5E240027 for <66117@debbugs.gnu.org>; Wed, 13 Dec 2023 00:40:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702424445; bh=CBqkGCvIMQjfxOGB3raq1R63k7gsE5DZpDqHxkgDaqg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=V9IOC0mAEQwl+3troMsFSuxkgzL6z0SQZnKz07w4PgDUGW86vAR6xDlEtG8fr67Xr YB45r8dJc2GzwOyfEU7tUEJq+MaB8SlqCkP1WOTOq9GG8Mifjw8eaRlAkP8mBAl7+q 3QIR60GySpuitrN8aaHiZTVpcgL472bn9M/samsRzBllH85CvabLAv4eKIbjgWRxKS u2Ze4dm9pHrPaF19tlgZJVvAacHWTcBMv8iF9kuI6OuIvNTVZAr+Lm+cKTnCPLC9xH EWna5LW2nr0JVjNj6D7VxSraSIdNgfPb/HrF+nnoNkUCfckE60mBIPYgyE4AB73ytK MkKItfswhuH/Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SqZqb6b8dz6txR; Wed, 13 Dec 2023 00:40:43 +0100 (CET) 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: , 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:276100 Archived-At: Stefan Monnier writes: >> E.g. company-dabbrev-code creates a dynamic binding for case-fold-search in >> one place and then calls a function (company-dabbrev--search) that iterates >> across all buffers with re-search-forward. > > BTW, that `company-dabbrev-code` function may not do what you expect > in those buffers that have set `case-fold-search` buffer-locally. Yup. Steps to reproduce: 1. emacs -Q 2. M-: (setq-local case-fold-search nil) 3. C-x b (to *Messages*) 4. M-: (let ((case-fold-search t)) (with-current-buffer (get-buffer "*scratch*") (search-forward "CREATE"))) 5. Observe search failing If step (2) is omitted, search succeeds. Although, I am not sure if I like that let-binding is not reliable for buffer-locals. It is simply confusing from the point of view of let usage; even if documented. I'd rather go for `let' becoming more consistent. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at