An Emacs mode for editing Python code

reports an error: Wrong number of arguments: #[nil ...

Reported by Yaroslav Halchenko on 2013-08-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
High
Andreas Roehler

Bug Description

again with current tip of bzr 1288, trying to edit file http://www.onerussian.com/tmp/pybetaseries.py and if going to the end of file and hitting Enter -- results in

if: Wrong number of arguments: #[nil "Á ŽŠebˆÃÄÅÆ#
3 ... [save-match-data-internal match-data ((byte-code "ÁÂ\"‡" [save-match-data-internal set-match-data evaporate] 3)) re-search-forward "\\s-$" nil t skip-syntax-backward "-" 0 ...] 4 2065833 "*"], 2 [2 times]

(partial paste)

That is on Debian
GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.18) of 2013-06-25 on sochi, modified by Debian

Changed in python-mode:
milestone: none → 6.1.2
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → High
Changed in python-mode:
status: New → In Progress
Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
Andreas Roehler (a-roehler) wrote :

Am 14.02.2014 17:38, schrieb Frank Stutzman:>
According to https://bugs.launchpad.net/python-mode/+bug/1207470 this bug
> was fixed in version 6.1.2 of python-mode.el. I am trying to run 6.1.3 and
> am running into it. I back dated to 6.1.2 and still see it there. I am
> running GNU Emacs 23.3.1.
>
> Its possible that something I'm doing it causing it, but I have no idea
> what. I can start emacs with no init file, load python mode, hit enter
> and I get the error.
>
> Has anyone else experienced this? I am sure that Andreas Roehler (the
> maintainer of python-mode.el) fixed it, but am thinking that it somehow
> didn't make it into the released code.
>
> Frank
>

Changed in python-mode:
milestone: 6.1.2 → 6.1.4
status: Fix Released → New
Andreas Roehler (a-roehler) wrote :

Can't reproduce - see attached ret.png
Please send the backtrace you got.
Which command is at RET?

Frank Stutzman (emacs-c) wrote :

Hi Andreas,

Thanks for looking at this.

I can't tell you what is happening, I'm a fairly modest emacs user, a poor python programmer, and well, my elisp is non-existent.

In any case, I've attached .png of what I have happening.

The first buffer is the entirety of my emacs init file.

The second is the *Messages* buffer. I'm not worried about the abbrevs file stuff for the moment. It also shows a few kill-lines I did in setting up the screen shot. We then see the error message described in the bug. This only shows up here (and in the mini-buffer, of course) when I switch to the empty tt.py file (which is in python-mode) and press enter (carriage return). There is nothing before or after the point. This error shows up for every subsequent press of the enter key regardless of whether or not anything proceeds it on the line.

Is there anything else I can get for you?

Frank Stutzman (emacs-c) wrote :

oops, one more thing

When I do a 'M-x describe-key-briefly' and press enter I get
  RET (translated from <return>) runs the command py-newline-and-indent

Andreas Roehler (a-roehler) wrote :

Okay, it's indeed a regression WRT to backward-compatibility

log message tagged 1207470 says all:

####
 Keep backward compatibility
  `delete-trailing-whitespace' takes args only since 2011-02-11
  See ChangeLog.15
####

Will fix this again.

Thanks a lot BTW for tracking down this so neatly onto this bug-number..

Andreas Roehler (a-roehler) wrote :

Checked in a fix. Does it work for you?

Frank Stutzman (emacs-c) wrote :

Ah, unfortunately, no.

I found a revision 1395 version of python-mode.el and used it to replace my existing python-mode.el (I did not install the entire package). Opening up an empty python file and pressing enter got me the same error. Just to be sure I was using the right version I did a 'M-x describe-variable' on py-version.

I've attached another .png, for whatever good it is.

Anything else I could get for you?

Am 15.02.2014 05:15, schrieb Frank Stutzman:
> Ah, unfortunately, no.
>
> I found a revision 1395 version of python-mode.el and used it to replace
> my existing python-mode.el (I did not install the entire package).
> Opening up an empty python file and pressing enter got me the same
> error. Just to be sure I was using the right version I did a 'M-x
> describe-variable' on py-version.
>
> I've attached another .png, for whatever good it is.
>
> Anything else I could get for you?
>
> ** Attachment added: "python-mode-bug2.png"
> https://bugs.launchpad.net/python-mode/+bug/1207470/+attachment/3981339/+files/python-mode-bug2.png
>

Thanks, see it. In py-newline-and-indent, where "(<= 23" is written a "(< 23" is needed.
Maybe should build an older Emacs here for testing...
Fix follows.

Andreas Roehler (a-roehler) wrote :

Am 15.02.2014 05:15, schrieb Frank Stutzman:
> Ah, unfortunately, no.
>
> I found a revision 1395 version of python-mode.el and used it to replace
> my existing python-mode.el (I did not install the entire package).
> Opening up an empty python file and pressing enter got me the same
> error. Just to be sure I was using the right version I did a 'M-x
> describe-variable' on py-version.
>
> I've attached another .png, for whatever good it is.
>
> Anything else I could get for you?
>
> ** Attachment added: "python-mode-bug2.png"
> https://bugs.launchpad.net/python-mode/+bug/1207470/+attachment/3981339/+files/python-mode-bug2.png
>

Should work now.

BTW most convenient to checkout current trunk probably is using bazaar from shell:

bzr branch lp:python-mode

resp. after initial checkout updating by just

bzr pull

from that directory

Changed in python-mode:
status: New → Fix Committed
Frank Stutzman (emacs-c) wrote :

YES! That fixes it!

I'm very new to open source development and I have to say that this has been a pleasure to work with you on this.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers