GNU bug report logs - #28051
[w32 / python "legacy" completion] Multiline Statement Indentation Error

Previous Next

Package: emacs;

Reported by: evgeniy.sharapov <at> gmail.com

Date: Fri, 11 Aug 2017 17:55:02 UTC

Severity: normal

Tags: confirmed, patch

Found in version 25.2

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Glenn Morris <rgm <at> gnu.org>, Evgeniy Sharapov <evgeniy.sharapov <at> gmail.com>, 28051 <at> debbugs.gnu.org
Subject: bug#28051: Multiline Statement Indentation Error in Inferior Python Mode
Date: Mon, 21 Aug 2017 21:36:20 -0400
npostavs <at> users.sourceforge.net writes:

>> I can reproduce this on Windows.  And on GNU/Linux after doing (setq
>> python-shell-completion-native-enable nil).  Perhaps this is one of the
>> "limitations" referred to in the comments of python.el:
>>
>>     ;; ...the "fallback" or "legacy" mechanism works by executing Python
>>     ;; code in the background and enables auto-completion for shells
>>     ;; that do not support receiving escape sequences (with some
>>     ;; limitations, i.e. completion in blocks does not work).
>
> I think the best we can do is disable completion with an error message
> when the prompt is "..."

> @@ -3632,7 +3639,9 @@ python-shell-completion-at-point
>                         ;; Also, since pdb interaction is single-line
>                         ;; based, this is enough.
>                         (string-match-p python-shell-prompt-pdb-regexp prompt))
> -                   #'python-shell-completion-get-completions)
> +                   (if (equal python-shell--block-prompt prompt)
> +                       (user-error "Cannot use standard completion in multiline statement")
> +                     #'python-shell-completion-get-completions))
>                    (t #'python-shell-completion-native-get-completions)))))

Hmm, when using company-mode the error message is sent repeatedly, which
seems pretty annoying.  But silently returning no matches could be
confusing.  Dimitri, any advice?




This bug report was last modified 7 years and 269 days ago.

Previous Next


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