Subject: bug#54996: Emacs hangs when editing Python code with debug-on-error set to t

From: Richard Stanton <[email-masked]>
Date: Sun, 17 Apr 2022 13:16:26 -0700

Running Emacs 28.1 on MacOS 12.3.1, I’ve encountered a situation where Emacs hangs while editing Python code.

To see the problem, fire up Emacs 28.1 with init.el containing just one line:

———————
(setq debug-on-error t)
———————

Now open a Python file containing the following text:

———————
"""Text in triple double quotes"""
———————

Put the cursor right at the start of the file, on the first double quote, and press ‘, the single quote character. On my machine, Emacs now hangs and doesn’t respond to the keyboard. Without debug-on-error, this works just fine.

Best,

Richard Stanton