On Mon, 29 Nov 2010 08:55:50 -0800 (PST)
Rich Shepard <[email protected]> wrote:

>    I'd like help figuring this one out.

Okay, I'll give it a shot.  Mind you, I've never used python-mode
at all, so I may be all wet here.  You Have Been Warned.

>    When I start emacs it tells me that it cannot find ipython.
> In ~/.emacs' python section I have:
> 
> (setq load-path (cons "~/development/python/python-mode-1.0"
> load-path)) (autoload 'python-mode "python-mode" "Python
> editing mode." t) (require 'ipython)

>From my googling about, you should have

  (setq ipython-command "/usr/bin/ipython")...

instead of the (setq load-path ...))...

I got that from the ipython.el file, located at 

  <http://ipython.scipy.org/dist/ipython.el>.

You can also find a lot of good info in the Python programming
pages of the Emacs Wiki:  

  <http://www.emacswiki.org/emacs/PythonProgrammingInEmacs>.

The IPython stuff is about two-thirds down the page.

>    I see nothing specifying a path for emacs and this error is
> new since the distribution upgrade. My assumption is that emacs
> 'knows' to look in /usr/bin/ for ipython without needing the
> path specified.

Well, no, it doesn't.  The load-path specifies where emacs will
look for emacs "libraries", i.e., Emacs-Lisp packages.  So far as
I know, Emacs doesn't expect anything else to be there.  (I could
always be worng, of course.)  I don't know how Emacs is set up on
your system, so I can only tell you how it works on mine.
According to the sources on the Web, Emacs should look in
/usr/local/share/emacs/site-lisp for libraries.  However, Fedora
installs GNU Emacs in /usr, rather than /usr/local, and it doesn't
know anything about the /usr/local location.  Since I wanted to
keep site-local things out of the main distro installation, I set
up Emacs to look in the /usr/local location.  In the file
default.el, in /usr/share/emacs/site-lisp, I added the following
lines:

;;; Add the site-wide local directory hierarchy for Emacs-lisp
packages. (add-to-list 'load-path
"/usr/local/share/emacs/site-lisp/") (let ((default-directory
"/usr/local/share/emacs/site-lisp/"))
(normal-top-level-add-subdirs-to-load-path))

With that in place, you should be able to put ipython.el in
/usr/local/share/emacs/site-lisp and Emacs will see it when it
starts up.  (Oh, and I had to make a soft link from default.el
into the site-start.d directory.)

If I want to experiment with my own .el files, I put such things
in ~/.emacs.d/site-lisp, and added the following to my .emacs
startup file:

;;; Add user-only local storage for Emacs-Lisp packages
(let ((default-directory "~/.emacs.d/site-lisp/"))
  (normal-top-level-add-to-load-path '("."))
  (normal-top-level-add-subdirs-to-load-path))


I must admit, the debugger output didn't tell me anything,
either.  :-) I've not had to use the debugger, so it's all...
err... whatever-it-is to me.  :-)

Anyway, I hope this helps, at least a little.

--Dale

--
"On two occasions I have been asked [by members of Parliament!],
'Pray, Mr. Babbage, if you put into the machine wrong figures,
will the right answers come out?'  I am not able rightly to
apprehend the kind of confusion of ideas that could provoke such
a question."  -- Charles Babbage
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to