GNU bug report logs -
#28051
[w32 / python "legacy" completion] Multiline Statement Indentation Error
Previous Next
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
Message #32 received at 28051 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I have pyreadline installed. It does help in a sense that completion works
then in the inferior python mode, although I get following *Warning* buffer
Warning (python): Python shell prompts cannot be detected.
If your emacs session hangs when starting python shells
recover with ‘keyboard-quit’ and then try fixing the
interactive flag for your interpreter by adjusting the
‘python-shell-interpreter-interactive-arg’ or add regexps
matching shell prompts in the directory-local friendly vars:
+ ‘python-shell-prompt-regexp’
+ ‘python-shell-prompt-block-regexp’
+ ‘python-shell-prompt-output-regexp’
Or alternatively in:
+ ‘python-shell-prompt-input-regexps’
+ ‘python-shell-prompt-output-regexps’
Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support
readline, yet ‘python-shell-completion-native-enable’ was t and "python" is
not part of the ‘python-shell-completion-native-disabled-interpreters’
list. Native completions have been disabled locally.
But the *Python* buffer says everythng has been loaded ok
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>>
==========================================
Evgeniy N. Sharapov
Phone: (630) - 779 - 3208
On Sat, Aug 19, 2017 at 10:45 AM, <npostavs <at> users.sourceforge.net> wrote:
> evgeniy.sharapov <at> gmail.com writes:
>
> > leads to IndentationError once I try to enter multi-line statements in
> > the Inferior python mode.
> >
> > Steps:
> >
> > 1. Start Emacs
> > 2. M-x run-python
> > 3. try to enter something simple like
> >
> > for x in range(10):<RET>
> > <TAB>print x<RET>
> >
> > 4. The following error occurs:
> >
> > File "<stdin>", line 1
> > print x
> > ^
> > IndentationError: unexpected indent
>
> Does it help if you install pyreadline? From comments in python.el:
>
> ;; If your
> ;; Python installation lacks readline (like CPython for Windows),
> ;; installing pyreadline (URL `http://ipython.org/pyreadline.html')
> ;; should suffice. To troubleshoot why you are not getting any
> ;; completions, you can try the following in your Python shell:
>
> ;; >>> import readline, rlcompleter
>
> ;; If you see an error, then you need to either install pyreadline or
> ;; setup custom code that avoids that dependency.
>
[Message part 2 (text/html, inline)]
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.