python-mode does not work

Bug #134308 reported by Gustavo Carneiro
8
Affects Status Importance Assigned to Milestone
python-mode (Ubuntu)
Fix Released
Medium
Matthias Klose

Bug Description

Binary package hint: emacs22

I type M-x python-mode. l get an error message saying it could not find a file needed to support python-mode. It works perfectly with the upstream version manually installed (which I had to go back to).

Related branches

Revision history for this message
Reinhard Tartler (siretart) wrote :

which file is missing? can you please attach the output of your *Messages* buffer?

Changed in emacs22:
assignee: nobody → siretart
status: New → Incomplete
Revision history for this message
Reinhard Tartler (siretart) wrote :

It turns out that the problem is that an removed but not purged python-mode package breaks emacs22:

10:44:12 < seb128> siretart: confirmed, if you remove python-mode and let it configured it breaks emacs22

we need to fix /etc/emacs/site-start.d/50python-mode.el for that.

Changed in emacs22:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

Milestoning this as we can't release without working python-mode in emacs ;)

Cheers,
 Michael

Revision history for this message
Matthias Klose (doko) wrote :

fixed in 1.0-3.1ubuntu1

Changed in python-mode:
assignee: siretart → doko
status: Confirmed → Fix Released
Revision history for this message
Joachim Dahl (jdahl) wrote :

I just installed emacs22 with version 1.0-3.1ubuntu1 of python-mode, and I have the exact same problem.

M-x python-mode

gives me

Cannot open load-file: python-mode

Revision history for this message
Reinhard Tartler (siretart) wrote :

please paste the output of `dpkg -l python-mode`.

does python-mode work after you do a 'dpkg --purge python-mode'?

Revision history for this message
James Henstridge (jamesh) wrote :

I ran into this too, and removing python-mode solved the problem.

Looking at the python-mode package's install scripts, it doesn't byte-compile the elisp for Emacs 22 (the fix doko is referring to).

However, the /etc/emacs/site-start.d/50python-mode.el file still gets processed by emacs22 and appears to shadow the builtin python-mode.

There seem to be two solutions here:
 1. make 50python-mode.el check the Emacs version
 2. install 50python-mode.el into a version dependent startup directory.

Revision history for this message
Steven Brown (steven-w-j-brown) wrote :

I had this same problem. Here was the output requested above.

$ dpkg -l python-mode
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
rc python-mode 1:1.0-3.1ubuntu1 Emacs-lisp python-mode and doctest-mode for the Python language

Purge solved it. Thanks! :)

$ dpkg --purge python-mode
(Reading database ... 197415 files and directories currently installed.)
Removing python-mode ...
Purging configuration files for python-mode ...

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.