[IPython-user] PDB temporary buffers under emacs

Martin Lüthi answer at tnoo.net
Thu Jun 26 20:00:26 CDT 2003


Hi

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.

Best, Martin

-- 
Martin Lüthi                 answer at tnoo.net





More information about the IPython-user mailing list