From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers Date: Tue, 02 Jan 2024 13:57:44 +0100 Message-ID: References: <878r919qfh.fsf@localhost> <83sf41jed7.fsf@gnu.org> <87y1dtyu4y.fsf@localhost> <83plz5jdgj.fsf@gnu.org> <87v88xyt2a.fsf@localhost> <83o7epjaon.fsf@gnu.org> <87edfipbpf.fsf@localhost> <877cl7n0ux.fsf@localhost> <878r5953ux.fsf@localhost> <8734vg6b62.fsf@localhost> <87wmss3t31.fsf@localhost> <87le983rya.fsf@localhost> <875y0caqg0.fsf@localhost> <87zfxo9bj3.fsf@localhost> 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="26463"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66117@debbugs.gnu.org, dmitry@gutov.dev, Eli Zaretskii , mattias.engdegard@gmail.com, Stefan Monnier To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 02 13:58:18 2024 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 1rKeLa-0006ea-27 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jan 2024 13:58:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKeLJ-0001pG-Tt; Tue, 02 Jan 2024 07:58:01 -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 1rKeLI-0001oK-DC for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 07:58:00 -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 1rKeLI-0003hp-3k for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 07:58:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKeLK-00059Y-51 for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 07:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jan 2024 12:58:02 +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.170420027719798 (code B ref 66117); Tue, 02 Jan 2024 12:58:02 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 2 Jan 2024 12:57:57 +0000 Original-Received: from localhost ([127.0.0.1]:49577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKeLF-00059F-8H for submit@debbugs.gnu.org; Tue, 02 Jan 2024 07:57:57 -0500 Original-Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:55546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKeLC-000591-Q0 for 66117@debbugs.gnu.org; Tue, 02 Jan 2024 07:57:56 -0500 Original-Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a27cc66d67eso215206966b.2 for <66117@debbugs.gnu.org>; Tue, 02 Jan 2024 04:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704200266; x=1704805066; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dc4ZuDjlKdgRp9MoKTnZ3wSICUTDb1mco6mrPCdOwC4=; b=LW12OBKaklIOHxxvMbLyWWjsKoVjIVeGqaV4ORUmMV0OBG1t1O2Ea0OTA260/0teaP Nm4NaAqeyeRSnrUE2E9bK8384urU/WoPyYwP+82NbyatG+Zvlae4PbBXDHmGz+6URmow oHV2XpA1Kid1MdNJN9JJnQLa+dUVfg+cyhoRxqgK4g6v21Vlg+qZq6qH90/TUbJM+AfT covcVe5I3/7dmLTkCEPdWu05IvLgPZedsUTG7uo45CH5VU1x/XanqPPEx4bhD3EQ6oQ5 nZ3E+GZ2m/l7VyU/128SGVwTASZSfmk1NtebyJ5b3DCPsb963/m7l6eOTJNrM+2uVGoR MwJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704200266; x=1704805066; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Dc4ZuDjlKdgRp9MoKTnZ3wSICUTDb1mco6mrPCdOwC4=; b=b+Z6hHnpGITkhrN8kCTU7kO8kVRIoSFTJQBzKHFrllUan8nLirotnx0cRLF1Gx3QkZ 8a8Pv/6kqbHI1PvNjLZUE6JVm8ntDcd0pvR3SCfzBvRhHLQEsQYtrxHEJDbNIXtJ0nu/ c0g3Xqg/4gIGmw2R9/wNxjlAtSKU320RUFNgEzkmlVY67PVCtVvXc+PvSzuOe168xwIR tVI7w7l4f+bjXknXsS1uS21SzGF8dcjRV6QUpEEgyGHHU/gjBjSqEdkLOX6iN1DrCyNB auNmPQM0wQFpuVrmAcnASBkNwad/3VeSOFQF9yimFICarDH+IEKf2EybdmceFr9pKeYH mP3g== X-Gm-Message-State: AOJu0Yz+4xZVPmtGH3jDyD2bYLq8wXAU59OwhTgeciUCOevy9rplyy2U KXCJSRDOcFKEcrUEwTSWgTjoSctaxD4= X-Google-Smtp-Source: AGHT+IG1EZRI91NgpAmVrdkKjCMMbmb5KNK42tyZw8AKnCMRzpEGznUv19NX+FDA6IL3HMWJ1g31Mg== X-Received: by 2002:a17:906:958:b0:a1d:3b3b:8d76 with SMTP id j24-20020a170906095800b00a1d3b3b8d76mr8645800ejd.27.1704200266250; Tue, 02 Jan 2024 04:57:46 -0800 (PST) Original-Received: from Pro.fritz.box (pd9e36b7e.dip0.t-ipconnect.de. [217.227.107.126]) by smtp.gmail.com with ESMTPSA id g1-20020a17090604c100b00a2714f1ba8asm6520391eja.160.2024.01.02.04.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 04:57:45 -0800 (PST) In-Reply-To: <87zfxo9bj3.fsf@localhost> (Ihor Radchenko's message of "Tue, 02 Jan 2024 12:15:28 +0000") 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:277235 Archived-At: Ihor Radchenko writes: > Gerd M=C3=B6llmann writes: > >>> Both versions are actually clear for me. What was not clear for me is >>> how the docstring explains my `let' example. >> >> Sorry, I've lost track what the let example is.=20 > > (defvar-local eval-tests/buffer-local-var 'default-value) > Thanks.=20 > (with-temp-buffer > (setq-local eval-tests/buffer-local-var 'local-value) > (let ((eval-tests/buffer-local-var 'let-value)) > ;; Let in a buffer with local binding does not change the > ;; default value for variable. > (should (eq 'default-value (default-value > 'eval-tests/buffer-local-var))))) I assume this is clear. Temp buffer has local value, the let changes the local (current) value, default-value determines the value as if the local values weren't there, and so on. > > (with-temp-buffer > ;; (setq-local eval-tests/buffer-local-var 'local-value) > (let ((eval-tests/buffer-local-var 'let-value)) > ;; Let in a buffer with local binding does not change the > ;; default value for variable. > (should (eq 'let-value (default-value 'eval-tests/buffer-local-var)= )))) Here, temp has no local value, so the current value is the global one. Let changes the global (current) value, and default-value picks that up. In both cases, I don't know if that's mentioned explicitly in some doc string. It's the normal behavior of let with special variables (dynamic variables). The current value that is set changes depending on circumstances.