ipython emacs IndentationError
Bug #1252978 reported by
Andreas Roehler
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Opinion
|
Medium
|
Andreas Roehler |
Bug Description
http://
Really annoying problem in ipython prompt in emacs:
In [128]: if 1==1:
.....: print "yes"
.....: else:
.....: print "no"
.....:
IndentationError: unindent does not match any outer indentation level
It looks perfectly aligned to me, not sure what trigger the error. No such problem when I do this in terminal.
Changed in python-mode: | |
status: | Confirmed → Opinion |
To post a comment you must log in.
A solution is given at the very place:
;;;;;;;;;;;;
You might try toggling autoindent with
%autoindent
since I think that has caused the problem for me before.
You can change this permanently using ipython's customization. After the proper imports (see the link) the following should work in ipy_user_conf.py:
# Emacs sets the term to dumb so we can distinguish that way options. autoindent = 0
if os.environ['TERM'] == 'dumb':
ip.
;;;;;;;;;;
Remains the question how to deal with this from python-mode.el