From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#51010: 29.0.50; python completion breaks upon non-trivial rl config Date: Sat, 30 Oct 2021 09:09:24 -0700 Message-ID: References: <88E85B14-518F-4F18-B2F0-96BA2FDA981C@gmail.com> <878rz1xfn4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12664"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51010@debbugs.gnu.org, Augusto Stoffel To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 30 18:10:21 2021 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 1mgqw1-00038P-G7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 18:10:21 +0200 Original-Received: from localhost ([::1]:39636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgqvz-0002Ug-Hr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 12:10:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgqvi-0002UH-MF for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 12:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgqvi-0003nv-Dp for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 12:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgqvi-0002NT-9A for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 12:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Oct 2021 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51010 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51010-submit@debbugs.gnu.org id=B51010.16356101739068 (code B ref 51010); Sat, 30 Oct 2021 16:10:02 +0000 Original-Received: (at 51010) by debbugs.gnu.org; 30 Oct 2021 16:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:58261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgqvE-0002M6-GY for submit@debbugs.gnu.org; Sat, 30 Oct 2021 12:09:32 -0400 Original-Received: from mail-pj1-f41.google.com ([209.85.216.41]:35367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgqvB-0002LV-TK for 51010@debbugs.gnu.org; Sat, 30 Oct 2021 12:09:30 -0400 Original-Received: by mail-pj1-f41.google.com with SMTP id n11-20020a17090a2bcb00b001a1e7a0a6a6so13022938pje.0 for <51010@debbugs.gnu.org>; Sat, 30 Oct 2021 09:09:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=HWNBK9SqlmlkeK6+m0Dnkg2ZJYvWycr6Yz+FkriSLoI=; b=H6HLpz8kOBZGwtGpv0sw8f09471GmmIyurStblBKxTHg1ahL3MF/sYKU9g1r2eCY0i qP6GgyZfSFrOQFvAG+OJaXpVOZx9NcmfE/P9Sk6jT6OuawF1ubII08LHtxWSwybTUyYp 4TKDwSNXqZuiBLF0xjXgBOh1UHJsoYKXCHk97OF6tBMlMEvSGaMzGwF3RgKWoapiSzVc nsPIzYH1ixm+hhUBzBXOp/986aOmyZ/M9BoyGxV1tfP53m9RATX7W2d4jr+yOxH2Vjvv D39/SNkaLwM0Kz7zMuz5vnqHEgQl71RqEsFnp3xXCc4Myb9FY+TFaAlcqNcDN/Y/63MS ngJQ== X-Gm-Message-State: AOAM532OKNQIxQaDJC55nNkPG+wSDyxPTGsLcGvl+tXalPk2bAEWx6YT cR0oZng0eMD5VPd8Qu9o6HolB97uygvBykRl6YKqIpJJ X-Google-Smtp-Source: ABdhPJzSrof+wGOOkEJXmjxLhxgp3hS0Hqd6Gk4vDR3HvIBGan7uKDR337otqerqniukdhxcuI9QygTVqUNFpT5nw9U= X-Received: by 2002:a17:90a:be10:: with SMTP id a16mr16718942pjs.133.1635610164338; Sat, 30 Oct 2021 09:09:24 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Oct 2021 09:09:24 -0700 In-Reply-To: (Carlos Pita's message of "Wed, 13 Oct 2021 21:46:45 -0300") 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:218623 Archived-At: Carlos Pita writes: > One alternative is to set the INPUTRC environment variable in order to > reset the user config. Short of doing that, we could just make one > regex less strict: > > (comint-redirect-finished-regexp > "1__dummy_completion__[[:space:]]*\n") > > to: > (comint-redirect-finished-regexp > "1__dummy_completion__.*\n") > > I propose this minimal change. A priori I'd expect that the text > "1__dummy_completion__" will always be in the output, no matter the > specific configuration, although the fact that python.el is already > doing `set show-all-if-ambiguous on` is a testimony to how fallible my > expectations are. Your below patch LGTM, but I would like confirmation from Eli or Lars if they think it is safe enough for emacs-28, or if they prefer that it should go to master. Carlos Pita writes: > From c6df93f051ea0d4934a100c925fc6f00aa02fc2a Mon Sep 17 00:00:00 2001 > From: Carlos Pita > Date: Wed, 13 Oct 2021 21:09:40 -0300 > Subject: [PATCH] Match dummy output even with non default rl config > > * lisp/progmodes/python.el > (python-shell-completion-native-get-completions): Match dummy output > even when readline is configured in non default ways. > --- > lisp/progmodes/python.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el > index b1f61c89a4..203531018e 100644 > --- a/lisp/progmodes/python.el > +++ b/lisp/progmodes/python.el > @@ -3811,7 +3811,7 @@ python-shell-completion-native-get-completions > (comint-redirect-perform-sanity-check nil) > (comint-redirect-insert-matching-regexp t) > (comint-redirect-finished-regexp > - "1__dummy_completion__[[:space:]]*\n") > + "1__dummy_completion__.*\n") > (comint-redirect-output-buffer redirect-buffer)) > ;; Compatibility with Emacs 24.x. Comint changed and > ;; now `comint-redirect-filter' gets 3 args. This