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: Wed, 28 Aug 2024 17:28:30 +0100 Message-ID: <877cc0a9xt.fsf@lipklim.org> References: <87v9bvwn63.fsf@gmail.com> <87zfoxocyu.fsf@lipklim.org> <861q28j1rt.fsf@gnu.org> Reply-To: Evgenii Klimov Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10844"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45938@debbugs.gnu.org, kobarity To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 28 18:30:27 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 1sjLYw-0002dH-9P for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Aug 2024 18:30:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjLYg-0005tO-B7; Wed, 28 Aug 2024 12:30:10 -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 1sjLYd-0005st-Uj for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 12:30:07 -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 1sjLYd-0004l1-LF for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 12:30:07 -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:References:In-Reply-To:From:To:Subject; bh=q+3xMSOMlIRcq6IUqvTwHEEQPrqlquaoaC2HdLQixTI=; b=NzxnPbTRSvwMj2dyOja12SypQQgGqErggg/S4U9Wgq4kl2lDXx+orfEOwv41vgRhSByOTgYo7cqfR4st/cjU+eGbt1iKiE4C8SibMYRQwaHOfoOJYWgfwiONXagajZObTPuZNGHuMmw4U+y4XllmYhI+wBZHaNmVJXcf0C9HikNa2cQuQ/SEp3dlaIyrWa2R08Fr5c+VV+VUQYXtF/dUNkl72JFlZ7mDOE6CqqGGtWGsYzG8u4vwgR/pO1mpCkS8pDONmM/T/qNehPwuIVruJLaWmtGy1kSzqF+0GphnjnOu2xk43CaGWm4y0Iki/6ZbebsTGERBSU+VvfiXqlmCww==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjLZV-0001Fq-QO for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 12:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Evgenii Klimov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2024 16:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45938 X-GNU-PR-Package: emacs Original-Received: via spool by 45938-submit@debbugs.gnu.org id=B45938.17248626064652 (code B ref 45938); Wed, 28 Aug 2024 16:31:01 +0000 Original-Received: (at 45938) by debbugs.gnu.org; 28 Aug 2024 16:30:06 +0000 Original-Received: from localhost ([127.0.0.1]:49637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjLYb-0001Cy-Od for submit@debbugs.gnu.org; Wed, 28 Aug 2024 12:30:06 -0400 Original-Received: from out-184.mta1.migadu.com ([95.215.58.184]:13382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjLYZ-0001Be-Ki for 45938@debbugs.gnu.org; Wed, 28 Aug 2024 12:30:05 -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=1724862513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q+3xMSOMlIRcq6IUqvTwHEEQPrqlquaoaC2HdLQixTI=; b=rza7coZZrdvgQ6AlMWvZPpHrTcA+WixhBCBzHzRDG404lkK7fI5Rlc4eRnsQGrQ7KSXKKK czhoamY0Kh+UFPxkw9W6FoaPk7DVEEYXojfwTvPNDMEWaOV1b7RIqNyKmxEkOHGBSzWLK5 IjQmpHRA6nDts+iILWBb2WfNT+Ca9xI= In-Reply-To: <861q28j1rt.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Aug 2024 15:00:06 +0300") X-Migadu-Flow: FLOW_OUT 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:290870 Archived-At: Hi Eli, Eli Zaretskii writes: [...] >> 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') >> > > Are these commands available in every version of Python? These commands are from GNU Readline, not from Python, but anyway: - colored-stats was first implemented in readline-6.3 [1] - colored-completion-prefix since readline-7.0 [2] Just for the reference, completion-prefix-display-length and show-all-if-ambiguous, that are already used during the setup, exists since readline-6.0 and readline-6.2 [3], respectively. Latest version of readline is 8.2. [1] https://git.savannah.gnu.org/cgit/readline.git/tree/CHANGES?h=master#n675 [2] https://git.savannah.gnu.org/cgit/readline.git/tree/CHANGES?h=master#n508 [3] https://git.savannah.gnu.org/cgit/readline.git/tree/CHANGES?h=master#n718