when using py-execute-buffer, the line count Incorrect

Bug #925586 reported by lowstz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Hi:

I write “from __future__import division ” in the first line, but it counts as line 6.

>>> ## executing /usr/tmp/Python3198TMp.py...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/tmp/Python3198TMp.py", line 6
    from __future__ import division
SyntaxError: from __future__ imports must occur at the beginning of the file

My .emacs config
(add-to-list 'load-path "~/.emacs.d/lowstz-path/python-mode/")
(setq py-install-directory "~/.emacs.d/lowstz-path/python-mode/")
(require 'python-mode)

Thanks,

Lowstz Chen.

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.5
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Andreas Roehler (a-roehler) wrote :

can you check out the current trunk and see if it's gone?

thanks for the report,

Andreas

Changed in python-mode:
status: In Progress → Fix Committed
Revision history for this message
lowstz (lowstz) wrote :

I tested the current trunk version .
The py-execute-buffer does not work .
When I using C-c C-c, it return Message: "and: Symbol's value as variable is void: async"

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 925586] Re: when using py-execute-buffer, the line count Incorrect

Am 02.02.2012 22:46, schrieb lowstz:
> I tested the current trunk version .
> The py-execute-buffer does not work .
> When I using C-c C-c, it return Message: "and: Symbol's value as variable is void: async"
>

AFAIS this symbol doesn't exist in current trunk anymore.
Maybe you are using something from outside, which introduced it?

Try start from emacs -q and python-mode.el from trunk exclusively.

Revision history for this message
lowstz (lowstz) wrote :

> Try start from emacs -q and python-mode.el from trunk exclusively.

Try this mothod, it work now.

Thanks for the great work on python-mode. ^0^

But I have to check my bad .emacs config. :(

Thanks again,

Lowstz Chen.

Revision history for this message
lowstz (lowstz) wrote :

When I introduced ipython.el , it return this message: "and: Symbol's value as variable is void: async"

ipython.el config in my .emacs is :
(require 'ipython)

The official interpreter work well.

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 03.02.2012 08:21, schrieb lowstz:
> When I introduced ipython.el , it return this message: "and: Symbol's
> value as variable is void: async"
>
> ipython.el config in my .emacs is :
> (require 'ipython)
>
> The official interpreter work well.
>

code from ipython.el is merged. You don't need it AFAIS.

Andreas

Revision history for this message
lowstz (lowstz) wrote :

> code from ipython.el is merged. You don't need it AFAIS.

I removed the ipython.el and customize py-shell toggle in python-mode to ipython.

Now all is well.

Thank you very much for your help!

Lowstz

Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.