From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45938: 28.0.50; python native completion fails with fancier readline settings Date: Tue, 07 Jun 2022 16:05:55 +0200 Message-ID: <87bkv4h8l8.fsf@gnus.org> References: <87v9bvwn63.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3806"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 45938@debbugs.gnu.org To: =?UTF-8?Q?Zolt=C3=A1n?= Vandrus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 07 16:07:48 2022 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 1nyZs3-0000n3-Vb for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 16:07:47 +0200 Original-Received: from localhost ([::1]:57288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyZs2-0006o5-G6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 10:07:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyZrL-0006lc-9A for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 10:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyZrK-0007kc-Ew for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 10:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyZrK-0002fl-7s for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 10:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jun 2022 14:07: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.165461077810223 (code B ref 45938); Tue, 07 Jun 2022 14:07:02 +0000 Original-Received: (at 45938) by debbugs.gnu.org; 7 Jun 2022 14:06:18 +0000 Original-Received: from localhost ([127.0.0.1]:41035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyZqc-0002eo-30 for submit@debbugs.gnu.org; Tue, 07 Jun 2022 10:06:18 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyZqQ-0002dv-90 for 45938@debbugs.gnu.org; Tue, 07 Jun 2022 10:06:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bWRsYL323+TjWmFZ1bDTHbLJAUmkPZ4br/uIy4ht4io=; b=HW5WWEJPG4RTMkf9v7CTGgndVu tcZPZzxGbmdtGbZLOW5ZQaRXaJ//tGv5kIVy53/q8RQHZ6n3Px+nvdBGBww3BeDulu2oKVr47k9qo q5yBYuPoR8adTPk2OpqureqonNl776vD4mWo/Vappfdx21KkdlOmvLSoxPP3OGdy2oA8=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyZqG-0003Um-GW; Tue, 07 Jun 2022 16:05:59 +0200 X-Now-Playing: Blaine L. Reininger's _The Blue Sleep_: "Molecular Landscape" In-Reply-To: <87v9bvwn63.fsf@gmail.com> ("=?UTF-8?Q?Zolt=C3=A1n?= Vandrus"'s message of "Sun, 17 Jan 2021 17:20:04 +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" Xref: news.gmane.io gmane.emacs.bugs:233894 Archived-At: Zolt=C3=A1n Vandrus writes: > Three problematic options I found are: > > set colored-stats on > set colored-completion-prefix on > set enable-bracketed-paste on > > With any of these M-x run-python warns: > > Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 does= n=E2=80=99t seem to > support readline, yet =E2=80=98python-shell-completion-native-enable= =E2=80=99 was t and > "python3" is not part of the > =E2=80=98python-shell-completion-native-disabled-interpreters=E2=80=99= list. Native > completions have been disabled locally. (I'm going through old bug reports that unfortunately weren't resolved at the time.) There seems to have been some progress here after this was reported. The only one of these settings that lead to this warning in Emacs 29 is: set colored-completion-prefix on But I'm actually not sure what the commit is that fixed the other cases. Let's see... commit a0973fa7a6e8162033abe29084f7b255976c74bc Author: Carlos Pita AuthorDate: Wed Oct 13 21:09:40 2021 -0300 Commit: Stefan Kangas CommitDate: Fri Nov 5 08:02:31 2021 +0100 Match dummy output even with non-default rl config =20=20=20=20 * lisp/progmodes/python.el (python-shell-completion-native-get-completions): Match dummy output even when readline is configured in non-default ways. (Bug#51010) Yes, that's the one -- reverting it makes all of those settings fail, and not just colored-completion-prefix. And that's because completion returns: ^[[01;35m0^[[0m^[[K__dummy_completion__ ^[[01;35m1^[[0m^[[K__dummy_complet= ion__=20=20 And without that setting, we get: 0__dummy_completion__ 1__dummy_completion__=20=20 So something has to strip ANSI codes here before doing the matching, and it's not done? I'm not really that familiar with all this stuff -- anybody know on what level this should be fixed? (The code is in python-shell-completion-native-get-completions.) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no