[IPython-user] Question about ipython.el
bruno
bruno.chazelas@ias.u-psud...
Fri May 11 04:40:26 CDT 2007
I have emacs
This is GNU Emacs 22.0.95.1 (i486-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-03-02 on pacem, modified by Debian
but it did not work either on the standard emacs 21.4
And thanks for the elisp trick. Two days ago I had never written an
single line of lisp nor elsisp ;o)
Bruno
Jouni K. Seppänen a écrit :
> bruno <bruno.chazelas@ias.u-psud.fr> writes:
>
>
>> here is the code I added to my .emacs :
>>
>
> Works for me; my Emacs claims to be "GNU Emacs 22.0.97.1
> (i386-apple-darwin8.9.1, Carbon Version 1.6.0) of 2007-04-08 on
> potato.local". What version of Emacs do you have?
>
>
>> (setq oldbuf (current-buffer))
>> (setq oldwindow (selected-window))
>>
> ...
>
>> (select-window oldwindow)
>> (switch-to-buffer oldbuf)
>>
>
> A better way to do this is save-window-excursion:
>
> (defun py-shell-stop-and-restart ()
> "Stop and restart the current python process"
> (interactive)
> (save-window-excursion
> (if (get-process "Python")
> (progn (kill-process "Python")
> (message "Python Killed"))
> (message "Python is not running Yet")))
> (py-shell))
>
>
More information about the IPython-user
mailing list