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 12:08:09 +0100 Message-ID: References: <878r919qfh.fsf@localhost> <878r5v20gu.fsf@localhost> <83bkapl5zh.fsf@gnu.org> <83zfy9jkoh.fsf@gnu.org> <878r5tglwp.fsf@localhost> <83ttohjet0.fsf@gnu.org> <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> 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="19836"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dmitry@gutov.dev, Eli Zaretskii , mattias.engdegard@gmail.com, Stefan Monnier , 66117@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 02 12:09: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 1rKce5-0004uk-JJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jan 2024 12:09:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKcdq-00042E-EO; Tue, 02 Jan 2024 06:09:02 -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 1rKcdo-00041o-68 for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 06:09: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 1rKcdn-0008G1-UM for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 06:08:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKcdp-0000eo-Tk for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 06:09:01 -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 11:09: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.17041937012467 (code B ref 66117); Tue, 02 Jan 2024 11:09:01 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 2 Jan 2024 11:08:21 +0000 Original-Received: from localhost ([127.0.0.1]:49496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKcdA-0000dj-RL for submit@debbugs.gnu.org; Tue, 02 Jan 2024 06:08:21 -0500 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:57850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKcd8-0000dV-Pi for 66117@debbugs.gnu.org; Tue, 02 Jan 2024 06:08:19 -0500 Original-Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2cceb90b398so35534311fa.3 for <66117@debbugs.gnu.org>; Tue, 02 Jan 2024 03:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704193690; x=1704798490; 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=GqPDaHjaCXbPJPlN5tyxc/WS9gj74LyYCMtJOoM0F6I=; b=ecQtDNpgOdruvbU72IGaB1FBHd95LrwXQmvKAvGVmnxHDt4wN0NRPMpL2rk4x7BK5F /HPmGehirRFmX8gOLIAC7YocXzGPwWtMkYDS/DjJ8p6Ujr5CYHJ7BlEwNH56Q1/Mg7gD 59HuirYONfunHdVS99qHXFzJzV+bX1RNpxIqw1oe9ZTyJwTxfLHt/Aaqzu6N75xtq5Oe d6EYWdp+sBRkpBcX0RVuQrNzGt/gi1Br2mXwRQ9GgfxAPQ3z6+qk2qQqo/RPyMuXnLvP dBBo8FLk7b3AkhNFdIWAE+81e96RirdamQQl48H4BeIVDXZSj/T1FJS9LDQ6woaTNDat o9Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704193690; x=1704798490; 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=GqPDaHjaCXbPJPlN5tyxc/WS9gj74LyYCMtJOoM0F6I=; b=ogorvNBhcfVM05KDGNBoBwSBFeEoreKPYB5Cefp+H7S3GZhy7XATUhQObg6dgkFfxZ kboelQIBMua3jBdQZwUxUNvwiGXZtjuCGrnr39EHBwKlGPeWbdASRB00tzCHHXX8zIEw XvWUxlrJYiU2T2qm3twJ1HhIrNiR6+1+YgdjQrUGpd5HKFJ5b4c/2n+7EzoDVu82XQqB qUjLbNe27KkC2ciKLmMLgEW6n0/C/3s8NjSmCTfW0QHLVkBkdaTd2WSFdvqSH0vYau+c 6TmVqgx0gm3lDLC3EhfEb5QLDuN/m6kNzrArjvVjqXXxPTZyHYlXR1BxwZF1DfVMj5Yq ZFgA== X-Gm-Message-State: AOJu0Yzzmaw12So1emMk2UloCRyxXYrIFKX7MTrmOd17fO+2ydTjF0Hp oN4sjL92eWlOD1Ht6Z1xQ9qhSUyA7Yg= X-Google-Smtp-Source: AGHT+IF0ce24y0S9Dhv51gWqHVWoInyaQ4JVPQmPsBpgs77ZyAbTYM85fXVqzlzp+0NMleSQKhrVfg== X-Received: by 2002:a2e:6e0d:0:b0:2cc:9435:a5f9 with SMTP id j13-20020a2e6e0d000000b002cc9435a5f9mr6925752ljc.36.1704193689744; Tue, 02 Jan 2024 03:08:09 -0800 (PST) Original-Received: from Pro.fritz.box (pd9e36b7e.dip0.t-ipconnect.de. [217.227.107.126]) by smtp.gmail.com with ESMTPSA id h16-20020aa7c950000000b0055534d5e75csm8941487edt.6.2024.01.02.03.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 03:08:09 -0800 (PST) In-Reply-To: <87wmss3t31.fsf@localhost> (Ihor Radchenko's message of "Tue, 02 Jan 2024 10:52:50 +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:277225 Archived-At: Ihor Radchenko writes: > Gerd M=C3=B6llmann writes: > >>>>>> C-h f default-value explains this: >>>>>> >>>>>> Return SYMBOL=E2=80=99s default value. >>>>>> This is the value that is seen in buffers that do not have their o= wn values >>>>>> for this variable. >>>>> >>> ... >>> I am sorry, but I do not see how the docstring explains what is >>> happening there. Because it is not clear what `let' does with the >>> default value. >> >> Sorry for not being clear. What I wanted to hint at is the part of the >> doc string that reads "that do not have their own values...", which >> means that what default-value returns depends whether or not SYMBOL got >> its own value in the buffer, and that depends on the presence of lets, >> and so on. > > It is not how I read this. AFAIU, `default-value' returns the value that > is used for buffers where the value is not explicitly set. Calling > `default-value' from inside the buffer where the value is set does not > change that global default value and should not change what > `default-value' returns. > > And indeed > > (defvar-local yant/test 'default-value) > (with-temp-buffer > (setq yant/test 'local-value) > (default-value 'yant/test)) ; =3D> 'default-value Maybe the documentation could be changed to be clearer, but I'm afraid I don't know how, because I think it describes 100% what is happening: the setq creates a buffer-local binding in the temp buffer, and default-value returns the value that is used in the case that a buffer does _not_ have its own value, which is the value set in the defvar-local...