From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 52380@debbugs.gnu.org
Subject: bug#52380: ERT, buffers and windows (was: bug#52380: 28.0.50; [PATCH] run-python no longer focuses interpreter)
Date: Fri, 10 Dec 2021 21:09:30 +0100 [thread overview]
Message-ID: <875yrw9q85.fsf_-_@gmail.com> (raw)
In-Reply-To: <87a6h89s7p.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Fri, 10 Dec 2021 20:26:34 +0100")
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Lars Ingebrigtsen <larsi@gnus.org> writes:
>>
>>> Makes sense to me; pushed to emacs-28.
>>
>> But then I reverted it, because it led to a test failure, so could you
>> have a look at that?
>
> Well great; I meant to write a test case for that eventually.
>
> Assuming you mean python-tests--bug31398? That's the one I'm seeing
> failing with my patch.
>
> I've banged my head on it for an hour now; I don't understand what's
> going on. The test case is checking precisely what I was trying to fix,
> and for some reason the set-buffer I removed does something that the
> pop-to-buffer I replaced it with doesn't.
>
> What set-buffer does not, of course, is actually work in interactive
> usage 😒
If I amend the test as follows:
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index 15bda5c197..783f115fc7 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -5454,6 +5454,7 @@ python-tests--bug31398
"Test for https://debbugs.gnu.org/31398 ."
(skip-unless (executable-find python-tests-shell-interpreter))
(let ((buffer (process-buffer (run-python nil nil 'show))))
+ (should (eq (get-buffer-window buffer) (selected-window)))
(should (eq buffer (current-buffer)))
(pop-to-buffer (other-buffer))
(run-python nil nil 'show)
… then (should (eq (get-buffer-window buffer) (selected-window)))
passes, but (should (eq buffer (current-buffer))) does not. Does that
make sense to anyone?
next prev parent reply other threads:[~2021-12-10 20:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 23:10 bug#52380: 28.0.50; [PATCH] run-python no longer focuses interpreter Kévin Le Gouguec
2021-12-10 12:06 ` Lars Ingebrigtsen
2021-12-10 12:08 ` Lars Ingebrigtsen
2021-12-10 19:26 ` Kévin Le Gouguec
2021-12-10 20:09 ` Kévin Le Gouguec [this message]
2021-12-10 20:30 ` bug#52380: ERT, buffers and windows (was: bug#52380: 28.0.50; [PATCH] run-python no longer focuses interpreter) Eli Zaretskii
2021-12-10 20:58 ` bug#52380: ERT, buffers and windows Kévin Le Gouguec
2021-12-11 22:23 ` bug#52380: 28.0.50; [PATCH] run-python no longer focuses interpreter Kévin Le Gouguec
2021-12-12 6:40 ` Lars Ingebrigtsen
2021-12-12 14:03 ` bug#52380: 28.0.50; [PATCH v2] " Kévin Le Gouguec
2021-12-13 4:17 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875yrw9q85.fsf_-_@gmail.com \
--to=kevin.legouguec@gmail.com \
--cc=52380@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).