* python-mode not working in Ubuntu
@ 2009-08-23 0:24 travis+ml-emacs
2009-08-23 18:28 ` Peter Dyballa
0 siblings, 1 reply; 2+ messages in thread
From: travis+ml-emacs @ 2009-08-23 0:24 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 3318 bytes --]
Hello,
I am an EMACS user and I know scheme, but I don't know EMACS lisp and I've run
into a problem where I could use some help.
I installed the following packages on Ubuntu intrepid:
bash$ dpkg -l | grep -E 'emacs|python-mode'
ii emacs 22.2-0ubuntu2 The GNU Emacs editor (metapackage)
ii emacs22-bin-common 22.2-0ubuntu2 The GNU Emacs editor's shared, architecture
ii emacs22-common 22.2-0ubuntu2 The GNU Emacs editor's common infrastructure
ii emacs22-gtk 22.2-0ubuntu2 The GNU Emacs editor (with GTK+ 2.x support)
ii emacsen-common 1.4.17 Common facilities for all emacsen
ii python-mode 1:1.0-3.1ubuntu4 Emacs-lisp python-mode and doctest-mode for
When I go to edit a python file with emacs, I get this in my messages buffer:
("emacs" "/tmp/foo.py")
Loading 00debian-vars...
No /etc/mailname. Reverting to default...
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50pymacs.el (source)...done
Loading /etc/emacs/site-start.d/50python-mode.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
File mode specification error: (file-error "Cannot open load file" "python-mode")
When I run M-x python-mode, I get this message:
call-interactively: Cannot open load file: python-mode
And yet, it appears to be there:
bash$ locate python-mode
/etc/emacs/site-start.d/50python-mode.el
/usr/lib/emacsen-common/packages/install/python-mode
/usr/lib/emacsen-common/packages/remove/python-mode
/usr/share/doc/python-mode
/usr/share/doc/pymacs/contrib/Giorgi/python-mode.diffs.gz
/usr/share/doc/python-mode/README.Debian
/usr/share/doc/python-mode/changelog.Debian.gz
/usr/share/doc/python-mode/copyright
/usr/share/emacs/site-lisp/python-mode
/usr/share/emacs/site-lisp/python-mode/doctest-mode.el
/usr/share/emacs/site-lisp/python-mode/pycomplete.el
/usr/share/emacs/site-lisp/python-mode/python-mode.el
/var/lib/dpkg/info/python-mode.conffiles
/var/lib/dpkg/info/python-mode.list
/var/lib/dpkg/info/python-mode.md5sums
/var/lib/dpkg/info/python-mode.postinst
/var/lib/dpkg/info/python-mode.prerm
Can anyone please help me figure out how to troubleshoot this?
BTW: Thanks for creating such a wonderful editor! It has really helped me
as a programmer over the years.
--
Obama Nation | My emails do not have attachments; it's a digital signature
that your mail program doesn't understand. | http://www.subspacefield.org/~travis/
If you are a spammer, please email john@subspacefield.org to get blacklisted.
[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: python-mode not working in Ubuntu
2009-08-23 0:24 python-mode not working in Ubuntu travis+ml-emacs
@ 2009-08-23 18:28 ` Peter Dyballa
0 siblings, 0 replies; 2+ messages in thread
From: Peter Dyballa @ 2009-08-23 18:28 UTC (permalink / raw)
To: travis+ml-emacs; +Cc: help-gnu-emacs
Am 23.08.2009 um 02:24 schrieb travis+ml-emacs@subspacefield.org:
> Can anyone please help me figure out how to troubleshoot this?
Launch GNU Emacs with -q and check the value of the variable load-
path. When it does not contain the element /usr/share/emacs/site-lisp/
python-mode then you'll need to add it, because GNU Emacs searches in
the directories given by load-path for .EL or .ELC files. You can do
it like this in your init file (which won't make the error from /etc/
emacs/site-start.d/50python-mode.el go away):
(add-to-list 'load-path "/usr/share/emacs/site-lisp/python-mode")
If this element is contained in load-path, then the syntax to load
that file is obviously faulty. The error message cites "Cannot open
load file" so it seems that the function load-file is used, which
assumes that the given file is complete, i.e., its extension is
named. The correct function call should be load-library. If the
latter is used *and* /usr/share/emacs/site-lisp/python-mode is in
load-path then the variables load-suffixes and load-file-rep-suffixes
could be wrong. The former should contain el and elc, the latter gz
to enable a modern GNU Emacs to load gzip'ed ELisp files.
Interactively you could try:
M-x load-library RET python-mode RET
The file python-mode.el seems to be an XEmacs file. GNU Emacs comes
with python.el. I think its "loaded" into GNU Emacs. The variable
auto-mode-alist should contain a mapping from .py files to python-
mode. So there should be no need for a python-mode.el file. Maybe
you'll have more success when you remove the python-mode package
(which should be easy).
--
Greetings
Pete
Rain is saved up in cloud banks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-23 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-23 0:24 python-mode not working in Ubuntu travis+ml-emacs
2009-08-23 18:28 ` Peter Dyballa
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.