bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51010: 29.0.50; python completion breaks upon non-trivial rl config


From: Stefan Kangas
Subject: bug#51010: 29.0.50; python completion breaks upon non-trivial rl config
Date: Sat, 30 Oct 2021 09:09:24 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Carlos Pita <carlosjosepita@gmail.com> 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 <carlosjosepita@gmail.com> writes:

> From c6df93f051ea0d4934a100c925fc6f00aa02fc2a Mon Sep 17 00:00:00 2001
> From: Carlos Pita <carlosjosepita@gmail.com>
> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]