[IPython-user] ipython + emacs py-execute-region problem.

Prabhu Ramachandran PrabhuRamachandran
Fri Oct 15 04:53:25 CDT 2004


>>>>> "FP" == Fernando Perez <Fernando.Perez at colorado.edu> writes:

    >> Well, I think Bo means that this does not seem to happen if he
    >> uses Alex's python-mode but does not use ipython.  So it
    >> appears that something funky happens when ipython is used.  I
    >> am not elisp guru either to be able to help.  When will Alex be
    >> back?

    FP> Oh, I misunderstood things then.  My point about the lag in
    FP> the ipython-compatible version of python-mode being an
    FP> unpleaseant situation remains, though.

    FP> I think Alex said a month, and he only left a few days ago.

Nevermind, I have fixed the problem.  I've updated python-mode.el to
the latest version (revision 4.62) available from CVS here:

 http://cvs.sourceforge.net/viewcvs.py/python-mode/python-mode/

I've retained Alex's fixes for IPython support in this version.  I
have also added a defcustom for py-shell-switch-buffers-on-execute
which defaults to true and will therefore switch buffers to the
py-shell when you execute a region.  If you turn it off it disables
this behavior.  So, switching the buffer was a feature and not a bug,
it appears.

So, to get Bo's desired behavior you simply need to do this in your
.xemacs/init.el:

 (require 'python-mode)
 (setq py-shell-switch-buffers-on-execute nil)
 (require 'ipython)


Please find attached a gzipped file containing the new-and-improved
python-mode.el.  I think you could consider sending this in to
python-mode at python.org.  I'm not doing it since I have already spent a
little too much time on this today.

cheers,
prabhu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-mode.el.gz
Type: application/octet-stream
Size: 43659 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/ipython-user/attachments/20041015/a25b4a17/attachment.obj 


More information about the IPython-user mailing list