From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45938: [PATCH] Avoid ANSI escape characters (bug#45938) Date: Wed, 28 Aug 2024 15:00:06 +0300 Message-ID: <861q28j1rt.fsf@gnu.org> References: <87v9bvwn63.fsf@gmail.com> <87zfoxocyu.fsf@lipklim.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20655"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45938@debbugs.gnu.org To: Evgenii Klimov , kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 28 14:02:04 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 1sjHNC-0005C5-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Aug 2024 14:02:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjHMM-000497-NS; Wed, 28 Aug 2024 08:01: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 1sjHMK-00047v-TG for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 08:01: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 1sjHMK-0006mX-Jv for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 08:01:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=tLKaMxgrnUzfAr1RtzAy1LrbR4MKduYU01vnt7kFwdo=; b=ZmU7ylya9yhkluYg6NftVrriei3Md1tKus3UpHc8XzNPU5aM3zbs2ynRBz69+gqSmkDHxIUjKjn0bAPd7y4U9EKwaiuCXu5xr7yCOeav8PsQATr9fluigRgDsfPmx3lM/AiSb4i8jQlEXmHGmk7ECQQaXU+09kcocii1ODv2LtiJtuWxNQQyoIUH7lIvF9j9Afa/RYHKxOoDjrJmV5Po28v2XTZC/NLHLfCkhfMZaX/yXCy/xPvfQb1DSq7C4sVl5J0LPCyoPDjGpZ05SME1WqVp8XZx43xW2vu5ZgvYdu2qvRYUdE78Uk9z6VUumB4iOAySgpHoqWzzfI2YAK0snw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjHNC-0001ld-GL for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2024 12:02:02 +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.17248465046760 (code B ref 45938); Wed, 28 Aug 2024 12:02:02 +0000 Original-Received: (at 45938) by debbugs.gnu.org; 28 Aug 2024 12:01:44 +0000 Original-Received: from localhost ([127.0.0.1]:48365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjHMu-0001ky-2l for submit@debbugs.gnu.org; Wed, 28 Aug 2024 08:01:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjHMr-0001kg-6f for 45938@debbugs.gnu.org; Wed, 28 Aug 2024 08:01:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjHLr-0006gw-Su; Wed, 28 Aug 2024 08:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tLKaMxgrnUzfAr1RtzAy1LrbR4MKduYU01vnt7kFwdo=; b=j97MemZ563zm aVegrq7cDhDSNWt7OSr57pcxbgp8mK+YZvdZhq+MckYUo2ggu8Jp4SN5EfnrmEPyvy2Pn0e5nlIH+ jUXR88d3U1qquWi7lBOMWFjttE/4WX43T2dHGKzHiA7/Fm4mBvOc3OSnGivEKUVXnQA4gj0RCupU/ xVjoo3D22BKd6wI2tmXiXrqyf4fycSLBDsZcBRAP+CoNcd1VnrlUxTJuppB9d8MjzZGTn0SlMAk9t l4yokA2SwpEoz3qlmEKd1TZ415LLKM2gSniuCjYOc83HsXsdpMz3QPItGw6XNoqEwMnbLwqH2C6D6 gqQhgUhK812lnkSZY+BMUw==; In-Reply-To: <87zfoxocyu.fsf@lipklim.org> (bug-gnu-emacs@gnu.org) 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:290860 Archived-At: > Date: Tue, 27 Aug 2024 22:47:05 +0100 > From: Evgenii Klimov via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > 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__ kobarity, any comments to the suggested patch? > 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?