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

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

Re: pYthon indentation


From: Andreas Röhler
Subject: Re: pYthon indentation
Date: Thu, 22 Oct 2015 19:24:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

 On 22.10.2015 16:24, rjd wrote:
I have discovered an issue with python-mode in emacs. I generally c++
develop and seldom do python (I have to say that I am not much of a fan, but
our testing framework uses it).

I have recently discovered this issue:

I emacs –Q

I open a python file

It contains:

Import re as myre

Var = [
%

The % represents the cursor location. Then, at that location I try to tab
and get this error:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
   python-indent-context()
   python-indent--calculate-indentation()
   python-indent-calculate-indentation(nil)
   python-indent-line(nil)
   python-indent-line-function()
   indent-for-tab-command(nil)
   call-interactively(indent-for-tab-command nil nil)
   command-execute(indent-for-tab-command)


I have not developed in python for a month or so but I cannot remember this
being an issue.
I am using emacs 24.5.1 windows 7 64 (unfortunately) and – of course - -Q so
no configuration.

Now, I try to apply python-mode 6.2.1 by running this

Emacs –Q
In *scratch*
(setq load-path (append load-path (list "~/.emacs.d/python-mode.el-6.2.1")))
(require 'python-mode)

I open up a python file (the same as above) then I CAN indent. This is all
well and good, so if I load python-mode 6.2.1 el file in my NORMAL
configuration this solve the issue, BUT now with the new 6.2.1 I do not get
the same theme coloring as before, which-function-mode seems to be broke
(again) and developing in python is sluggish.

For me, unfortunately, 6.2.1 solves one issue but creates others.

If, instead, I can just have the patch that solves the indentation issue,
that would be great.

Thank you.

Please do not cross-post. Just for the record here again;

python-mode.el's py-variable-name-face inherits default face. Use M-x customize-face RET ...

Please file bugs reports at

https://gitlab.com/python-mode-devs/python-mode/issues

or

https://bugs.launchpad.net/python-mode




reply via email to

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