GNU bug report logs -
#66117
30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Wed, 20 Sep 2023 08:53:02 UTC
Severity: minor
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> I do not mind adding tests, but it will not be as fast - I need help
>> with them.
>
> We could install just a few now, and the rest afterwards. You have
> already presented enough non-trivial cases that can be easily
> converted to tests, and I think it is a good idea to do that when we
> change such low-level and veteran code.
See the attached.
I am not sure if these few cases are enough to warrant a separate commit
though.
[0001-Add-tests-for-let-bug-66117.patch (text/x-patch, inline)]
From 147ae00df849f04cdb00e09d8079533fa5dea98a Mon Sep 17 00:00:00 2001
Message-ID: <147ae00df849f04cdb00e09d8079533fa5dea98a.1703341788.git.yantar92 <at> posteo.net>
From: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Sat, 23 Dec 2023 15:29:36 +0100
Subject: [PATCH] Add tests for `let' (bug#66117)
* test/src/eval-tests.el (eval-tests/default-value): New test.
---
test/src/eval-tests.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el
index 4589763b2f5..c1219591e40 100644
--- a/test/src/eval-tests.el
+++ b/test/src/eval-tests.el
@@ -282,4 +282,25 @@ eval-tests-defvaralias
(should-error (defvaralias 'eval-tests--my-c 'eval-tests--my-d)
:type 'cyclic-variable-indirection))
+(defvar eval-tests/global-var 'value)
+(defvar-local eval-tests/buffer-local-var 'value)
+(ert-deftest eval-tests/default-value ()
+ ;; `let' overrides the default value for global variables.
+ (should (default-boundp 'eval-tests/global-var))
+ (should (eq 'value (default-value 'eval-tests/global-var)))
+ (should (eq 'value eval-tests/global-var))
+ (let ((eval-tests/global-var 'bar))
+ (should (eq 'bar (default-value 'eval-tests/global-var)))
+ (should (eq 'bar eval-tests/global-var)))
+ ;; `let' overrides the default value everywhere, but leaves
+ ;; buffer-local values unchanged in current buffer and in the
+ ;; buffers where there is no explicitly set buffer-local value.
+ (should (default-boundp 'eval-tests/buffer-local-var))
+ (should (eq 'value (default-value 'eval-tests/buffer-local-var)))
+ (should (eq 'value eval-tests/buffer-local-var))
+ (with-temp-buffer
+ (let ((eval-tests/buffer-local-var 'bar))
+ (should (eq 'bar (default-value 'eval-tests/buffer-local-var)))
+ (should (eq 'bar eval-tests/buffer-local-var)))))
+
;;; eval-tests.el ends here
--
2.42.0
[Message part 3 (text/plain, inline)]
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
This bug report was last modified 1 year and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.