[Python-mode] python-mode modifies load-path emacs-wide.

Cavesnow cavesnow at gmail.com
Tue Aug 16 23:07:03 CEST 2011

Hash: SHA1

Hello Everyone,

I am talking about the bug


I will try to explain my idea a bit better. Removing part with 	the
direct modification of load-path I think is clear: a library shouldn't
interfer with global settings. If I understand correctly pycomplete
would probably be loaded from inside python-mode and it is not meant to
be a stand-alone library. Correct me if I am wrong. Anyway, since I have
not found any place in the python-mode.el file where pycomplete.el nor
did I find any auto-load instructions I thought of this solution. Let's
say that at a certain point python-mode wanted to use functions provided
in pycomplete and thus had to load it as a library. My idea was that in
that case the loading was to be made this way:

(let ((load-path (add-to-list 'load-path (concat py-library-path
  (load-library "pycomplete")

I have tested such a solution and theoretically it seams it works. The
idea was to avoid changing the load-path but!! having a library-wide
variable that contained the package path. Please correct me if I am
wrong about this.

In any case, it is absolutely not a problem for me if my proposal is not
accepted. Actually I would like to excuse myself if some of my
submissions lack in professionality and that it may take some of your
time to look at them, but I hope that some of my contributions will be
of use. In any case I found the load-path problem because I noticed
specifically that the package modified my path settings while I was
beginning to set up my python development environment. The other bugs I
have found occurred in a similar occasion. I was beginning to write a
python program and found out that some things didn't work.

Let's get back to the load-path bug:

Do you have any idea how to eliminate this? Or do you think it is a
minor problem? Can you tell me, if you think so, why is my approach
inapplicable or maybe there is some better solution?

And finally, can you please clarify at the current state how should
pycomplete.el work? How is it integrated with python-mode. I have seen
some strange behavior: for example the last item in the menu calls the
function: py-find-imports that is nowhere defined. From the
documentation it seams that it has some relation to completion. In
pycomplete.el there is no such function but there is a very similar one:
py-find-global-imports. This may be a mistake? In any case pycomplete is
not loaded anywhere.. Maybe it  would make sense to do a check if
pycomplete is loaded/loadable or not and modify the menu accordingly?
In any case I will soon (tomorrow, maybe) file a bug report about

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Python-mode mailing list