[IPython-user] PDB temporary buffers under emacs

Fernando Perez fperez at colorado.edu
Thu Jun 26 21:35:12 CDT 2003


Martin Lüthi wrote:

> I just started using ipython (again) under emacs. Really a very convenient
> and powerful working environment!
> 
> Probably it's just me, but I realized only after editing a temporary buffer
>  for some minutes that it was a temporary buffer. The current behavior is 
> (after activating @pdb and executing the buffer with C-c C-c)
> 
> 1 a temporary file is created (in /tmp) 2 the temporary file is executed
> unter ipython 3 an exception is thrown 4 pdb is called (nice) 5 emacs loads
> the temporary file and displays it in a buffer (this is where the confusion
> starts) 6 the pointer is set on the line where the exception occurred (very
> nice, but confusing since this is the temporary buffer)
> 
> While I can see why the temporary file is loaded (code snippets executed
> with C-c C-| only live in a temporary file), it is quite confusing that
> this happens. I would rather see the following behavior:
> 
> 5 emacs displays the original buffer 6 the pointer is set in the *original*
> buffer on the corresponding line
> 
> As a simple fix the temporary file could be loaded *read only*. I will have
> to dig into the elisp sources to find where to change this. Probably
> somebody out here (Alexander?)  has already fixed it or could give me some
> hints.

Well, I'll have to defer to Alex on this one, as my knowledge of elisp is
exactly zero.  Alex is the author/maintainer of the ipython-mode code, but I'm 
sure if you can find a fix for this behavior and hash it a bit with him, he'd 
take it in.

If you folks settle on a solution, please send it my way and I'll update the 
download.

Best,


f.




More information about the IPython-user mailing list