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 20:55:46 +0300 Message-ID: <86jzg0h6ql.fsf@gnu.org> References: <87v9bvwn63.fsf@gmail.com> <87zfoxocyu.fsf@lipklim.org> <861q28j1rt.fsf@gnu.org> <877cc0a9xt.fsf@lipklim.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12607"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45938@debbugs.gnu.org, kobarity@gmail.com To: Evgenii Klimov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 28 19:59:32 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 1sjMx8-000385-5a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Aug 2024 19:59:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjMwr-0002yP-5k; Wed, 28 Aug 2024 13:59:13 -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 1sjMwn-0002ng-4l for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 13:59: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 1sjMwm-0006Dz-E8 for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 13:59: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=TQB1Ir9jAdUDLczmd+O17pDApOvDwzuwTxFKv+ETjxc=; b=C61Jd5Zkbf7/+buOXI8LhRS7w0vouEtPCEJkZ/hnTO++q7xDaG9CepEuyR1AbUDyqoRT2qW6B7M0XfJGKqqk0LbefuvcKEu5LeRlhaPvxf2QuVEyJxz55o3+pnSjxMPNLnnOrBpIRsqwOntrZHibMfFtGwiZwImovQph+24Wap5GKTNF+XDgxiqXvUNW2hK+zMWKK0BpCo+L1Wmn9JOm6qDhxsdA6GGEVUC6l2Av9HA5BPKX/z9X99ZkedY5bnuLCG+KOlRfPB5jMwdDzK0vXGWWHZErHqgdWKlhxn+p81+IXSlRkWhGFBmzxm1zRM+ob/e0uZ/r3voV2MA+zX9ziA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjMxe-00052G-Ku for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2024 14:00: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 18:00: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.172486794219167 (code B ref 45938); Wed, 28 Aug 2024 18:00:02 +0000 Original-Received: (at 45938) by debbugs.gnu.org; 28 Aug 2024 17:59:02 +0000 Original-Received: from localhost ([127.0.0.1]:49693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjMwf-0004z2-Uu for submit@debbugs.gnu.org; Wed, 28 Aug 2024 13:59:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjMwd-0004yP-RZ for 45938@debbugs.gnu.org; Wed, 28 Aug 2024 13:59:00 -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 1sjMtZ-0005pM-Lz; Wed, 28 Aug 2024 13:55:49 -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=TQB1Ir9jAdUDLczmd+O17pDApOvDwzuwTxFKv+ETjxc=; b=HctmwrPLAQlF 5yaCNgjnjxu+0tRQ/891Yq54mLASTIz+F7EDXSjwXuZhZSQe2PHPTU9/iDMVkD9pGlEoqcGnIxYwN EOt9DgjgvR5hsGP+K2KrISeabe/2hxBHjllHQQvT/H6DhrYx8XIztY/ZfTQPNQbkJWh8LOhnkiX0X yZgLrzQta1eDHmATFeKXDNJ9RWMPjaioScMM40helKDVY6P/2vnf20eh6AmadkaCiQFb29rNF6jOz J9f5sbrVihHL2SWDcOuYVf8AXtDxeNhyUYx+8DuPez2txuFu/7e9kX+Cr+m0xBDbXbdQ+T5w0+B2M XK3jYve5tZMqEmI0j52xig==; In-Reply-To: <877cc0a9xt.fsf@lipklim.org> (message from Evgenii Klimov on Wed, 28 Aug 2024 17:28:30 +0100) 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:290878 Archived-At: > From: Evgenii Klimov > Cc: kobarity , 45938@debbugs.gnu.org > Date: Wed, 28 Aug 2024 17:28:30 +0100 > > 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 Yes, I know. But not every Python is built with GNU Readline, right? > - 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. Which versions of Python or GNU/Linux are likely to have older versions of Readline? And what happens in an older Readline when these commands are sent?