unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joost <joostkremers@fastmail.fm>
To: emacs-devel@gnu.org
Subject: `interrupt-process` doesn't work for Python on Windows
Date: Wed, 09 Feb 2022 10:17:33 +0100	[thread overview]
Message-ID: <dba7c01a-663c-4ca9-8cee-60cd81969acb@www.fastmail.com> (raw)

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



             reply	other threads:[~2022-02-09  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:17 Joost [this message]
2022-02-10 13:01 ` `interrupt-process` doesn't work for Python on Windows Eli Zaretskii

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=dba7c01a-663c-4ca9-8cee-60cd81969acb@www.fastmail.com \
    --to=joostkremers@fastmail.fm \
    --cc=emacs-devel@gnu.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).