From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Evgenii Klimov via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45938: [PATCH] Avoid ANSI escape characters (bug#45938) Date: Tue, 27 Aug 2024 22:47:05 +0100 Message-ID: <87zfoxocyu.fsf@lipklim.org> References: <87v9bvwn63.fsf@gmail.com> Reply-To: Evgenii Klimov Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30991"; mail-complaints-to="usenet@ciao.gmane.io" To: 45938@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 27 23:52:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sj472-0007pH-OH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Aug 2024 23:52:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sj46k-0002dv-Jo; Tue, 27 Aug 2024 17:52:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sj46i-0002dV-W5 for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 17:52:09 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sj46i-0000nC-NR for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 17:52:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=Wz9LtZqumNEDCc9h4/grj98K9849O/IILjxG1ibuxW8=; b=BD/WmzQVrEqJsZiP/mIEd2QAW3ivYAIWr3Rq+fUzvdB1sBKuvWiF1pjO9T9Skky8DfbhC9Li/J9RGtIskDblO5oicYf94NTB83Aflt1Yg5D0hDyzqfK3MyHopSt2Rr+qMDAohKW//v6eaI7Ohkg8GB4nlyGRwR0K5jxphYMWxhnYIWkg5bZZcQ/501soPT26rDiSomMLyqDPntFSD81TqqXmKyuflYSisG3e2MH+y6HCJP5cp4iw94v4njran2CWQi4jhYpDNzakWEpiHbXq9NgbZXAuQW86tivTwXFfHPED+wz9S/vkEd+43M5u2PSeJ97gPrcyskE1w+Mo4jGsKQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sj47Z-0002RK-Ps for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 17:53:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87v9bvwn63.fsf@gmail.com> Resent-From: Evgenii Klimov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2024 21:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45938 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17247955729357 (code B ref -1); Tue, 27 Aug 2024 21:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Aug 2024 21:52:52 +0000 Original-Received: from localhost ([127.0.0.1]:47721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sj47Q-0002Qm-0p for submit@debbugs.gnu.org; Tue, 27 Aug 2024 17:52:52 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sj42r-0002GF-Rx for submit@debbugs.gnu.org; Tue, 27 Aug 2024 17:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sj420-0002Fi-Fk for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 17:47:16 -0400 Original-Received: from out-170.mta0.migadu.com ([2001:41d0:1004:224b::aa]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sj41w-0000Lw-Mp for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 17:47:16 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lipklim.org; s=key1; t=1724795227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Wz9LtZqumNEDCc9h4/grj98K9849O/IILjxG1ibuxW8=; b=hwaQEgwXGkXxHPQVHGPu7ga0D2RIVKHR9ET28ZwUvL0tgoxJJkGNdmweHgZTTwN4EhDJV+ nikoxD0ehLKucPJnnCEj3mNxPAoWwvkFLo/WFncBhjYVn1gtYa0HzPk+pv2tFXge3ZOLSD G8zVZJyGIz8KyeGgfwRhJolwk4P4/7c= X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::aa; envelope-from=eugene.dev@lipklim.org; helo=out-170.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 27 Aug 2024 17:52:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290841 Archived-At: --=-=-= Content-Type: text/plain Tags: patch GNU Readline variables (colored-completion-prefix and colored-stats) set in .inputrc file by the user to improve GNU Readline output lead to corrupted completion candidates during native completion setup. Like this: ^[[01;35m0^[[0m^[[K__dummy_completion__ ^[[01;35m1^[[0m^[[K__dummy_completion__ However this is expected: 0__dummy_completion__ 1__dummy_completion__ In GNU Emacs 30.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101011 System Description: Guix System Configured using: 'configure CONFIG_SHELL=/gnu/store/fl3l5wx8qynjrvx5lilz6c38hb77cf36-bash-minimal-5.1.16/bin/bash SHELL=/gnu/store/fl3l5wx8qynjrvx5lilz6c38hb77cf36-bash-minimal-5.1.16/bin/bash --prefix=/gnu/store/45nwc8hc8fn1fhvr9qw01ylkfpvzxwsw-emacs-next-30.0.60-1.4e22ef8 --enable-fast-install --with-cairo --with-modules --with-native-compilation=aot --disable-build-details' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Avoid-ANSI-escape-characters-bug-45938.patch >From d5fb353404814afb135ba98effd200c5733bbcc3 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 (bug#45938) * lisp/progmodes/python.el (python-shell-completion-native-setup): Avoid escape characters in comint output --- lisp/progmodes/python.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a00289d6de9..7193cc19425 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4549,6 +4549,9 @@ (defun python-shell-completion-native-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.45.2 --=-=-=--