GNU bug report logs - #68559
[PATCH] Improve Python shell completion

Previous Next

Package: emacs;

Reported by: Liu Hui <liuhui1610 <at> gmail.com>

Date: Thu, 18 Jan 2024 04:50:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Liu Hui <liuhui1610 <at> gmail.com>
To: "Basil L. Contovounesios" <basil <at> contovou.net>
Cc: kobarity <kobarity <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>, Mattias Engdegård <mattias.engdegard <at> gmail.com>, 68559 <at> debbugs.gnu.org
Subject: bug#68559: [PATCH] Improve Python shell completion
Date: Wed, 13 Mar 2024 18:21:00 +0800
[Message part 1 (text/plain, inline)]
On Tue, Mar 12, 2024 at 12:02 AM Basil L. Contovounesios
<basil <at> contovou.net> wrote:
>
> Liu Hui [2024-03-11 19:35 +0800] wrote:
>
> > On Fri, Mar 8, 2024 at 11:44 PM Basil L. Contovounesios
> > <basil <at> contovou.net> wrote:
> >>
> >> Liu Hui [2024-03-06 18:14 +0800] wrote:
> >>
> >> > -                   (string-match-p "ipython[23]?\\'" python-shell-interpreter)))))
> >> > +                   (or (string-match-p "ipython[23]?\\'" python-shell-interpreter)
> >> > +                       (string= python-shell-readline-completer-delims ""))))))
> >>
> >> Just curious: what does the empty string signify?
> >>
> >> [ If it's not just a dumb question, perhaps the meaning could be added
> >>   to the variable's docstring/commentary. ]
> >
> > The empty string means no characters are considered delimiters and the
> > readline completion could consider the entire line of input without
> > breaking it into parts based on typical delimiters like spaces or
> > punctuation. The docstring is updated in the attached patch.
>
> Thanks!  But that makes me wonder: in the cases where we check
>
>   (string= python-shell-readline-completer-delims "")
>
> is there a possibility that the variable's value will be nil?
> (In which case we should compare with equal instead of string=.)

Yes, it is a string with native completion and may be nil with
non-native completion. I have updated the patch. Thanks.
[0001-Detect-the-readline-support-for-Python-shell-complet.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.