unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Evgenii Klimov via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 45938@debbugs.gnu.org, kobarity <kobarity@gmail.com>
Subject: bug#45938: [PATCH] Avoid ANSI escape characters (bug#45938)
Date: Wed, 28 Aug 2024 17:28:30 +0100	[thread overview]
Message-ID: <877cc0a9xt.fsf@lipklim.org> (raw)
In-Reply-To: <861q28j1rt.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Aug 2024 15:00:06 +0300")

Hi Eli,

Eli Zaretskii <eliz@gnu.org> 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





  reply	other threads:[~2024-08-28 16:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 16:20 bug#45938: 28.0.50; python native completion fails with fancier readline settings Zoltán Vandrus
2022-06-07 14:05 ` Lars Ingebrigtsen
2024-08-27 21:47 ` bug#45938: [PATCH] Avoid ANSI escape characters (bug#45938) Evgenii Klimov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-28 12:00   ` Eli Zaretskii
2024-08-28 16:28     ` Evgenii Klimov via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-08-28 17:55       ` Eli Zaretskii
2024-08-28 20:39         ` Evgenii Klimov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-29  4:47           ` Eli Zaretskii
2024-08-29 12:20             ` kobarity
2024-08-31 10:14               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cc0a9xt.fsf@lipklim.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=45938@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=eugene.dev@lipklim.org \
    --cc=kobarity@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).