From f28751ea25b757ffb2a13ed5fd7b536db3fe95ec Mon Sep 17 00:00:00 2001 From: Evgenii Klimov Date: Sun, 25 Feb 2024 20:12:38 +0000 Subject: [PATCH] Avoid ANSI escape characters in Python output (bug#45938) * lisp/progmodes/python.el (python-shell-completion-native-setup): Prevent Readline from emitting escape characters in comint output. (cherry picked from commit e27849ecf6ee01f6d02ef2785d0c10e32bc764e9) --- lisp/progmodes/python.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index dba2c4bf2ff..6914a663af0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4549,6 +4549,9 @@ def __PYTHON_EL_native_completion_setup(): readline.parse_and_bind('tab: complete') # Require just one tab to send output. readline.parse_and_bind('set show-all-if-ambiguous on') + # Avoid ANSI escape characters in the output + readline.parse_and_bind('set colored-completion-prefix off') + readline.parse_and_bind('set colored-stats off') # Avoid replacing common prefix with ellipsis. readline.parse_and_bind('set completion-prefix-display-length 0') -- 2.39.5