[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`interrupt-process` doesn't work for Python on Windows
From: |
Joost |
Subject: |
`interrupt-process` doesn't work for Python on Windows |
Date: |
Wed, 09 Feb 2022 10:17:33 +0100 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-4748-g31a5b5f50e-fm-cal2020-20220204.001-g31a5b5f5 |
Hi,
After running into an issue with a package that enhances Emacs' inferior Python
shell and a long back and forth with the package's maintainer, the maintainer
feels there might be a bug in Emacs. Specifically, the command
`interrupt-process` is not able to interrupt the Python process on Windows.
Details are in this message and in the message's thread:
https://github.com/jdtsmith/python-mls/issues/8#issuecomment-1033120469
To quote the relevant section:
====================
Here is the issue: `interrupt-process` (and internal C function) does not
function correctly to interrupt Python on Windows emacs! While at the command
prompt, a simple `C-c` does correctly interrupt (and returns `Keyboard
Interrupt\n>>> ` promptly), `interrupt-process` does not, and leads to the
double-traceback you reported earlier, but _only after you send another
newline_. This is incorrect behavior, and seems to represent a bug in the way
Emacs sends interrupts on Windows, which differs from `C-c` in the command
prompt.
It's easy to verify the difference:
* `C-c` at `>>> ` python prompt in "Command Prompt": immediate
`KeyboardInterrupt` and prompt.
* `C-c C-c` at `>>> ` python prompt in Emacs _Python_: no `KeyboardInterrupt`.
====================
Should I file a bug report about this? Or is this something Emacs can do
nothing about?
TIA
Joost
--
Joost Kremers
Life has its moments
- `interrupt-process` doesn't work for Python on Windows,
Joost <=