[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUD octave support
From: |
John W. Eaton |
Subject: |
Re: GUD octave support |
Date: |
Mon, 10 Dec 2007 18:10:40 -0500 |
On 8-Dec-2007, Nick Roberts wrote:
| > Does it even have to be a command-line option? Could it instead be a
| > function to call to set the display style for filenames in Octave's
| > debugging mode?
|
| It could be a function call. XEmacs has a mode for Python (another scripting
| language) which uses something called Pdbtrack and looks something like this
| (with a python script called fibo.py and a function called fib):
|
| M-x python-shell (note doesn't work with Emacs' run-python)
|
| Then in the buffer this command creates:
|
| Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)
| [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import pdb
| >>> import fibo
| >>> pdb.run ("fibo.fib(1000)")
| > <string>(1)<module>()
| (Pdb) b fibo.py:5
| Breakpoint 1 at /home/nickrob/python/fibo.py:5
| (Pdb) c
| > /home/nickrob/python/fibo.py(5)fib()
| -> while b < n:
| (Pdb)
|
| At which point the source appears in a buffer with the overlay arrow pointing
| to the appropriate line.
|
| This is more lightweight than GUD, and I think that the idea is that the user
| interacts with Python in a shell buffer in the normal way (a bit like he would
| with Octave after run-octave). Then if he wants to start debugging a script
he
| can do this just by importing pdb and using pdb.run.
|
| However, this would require more work in Emacs than just using GUD.
I don't understand this part. Doesn't the GUD mode of Emacs have to
start Octave? As part of the initialization, and instead of using a
command-line option, can't it send a command to Octave to set the
special output format?
jwe
- GUD octave support, John W. Eaton, 2007/12/04
- Re: GUD octave support, Nick Roberts, 2007/12/05
- Re: GUD octave support, John W. Eaton, 2007/12/05
- Re: GUD octave support, Nick Roberts, 2007/12/05
- Re: GUD octave support, John W. Eaton, 2007/12/05
- Re: GUD octave support, Nick Roberts, 2007/12/07
- Re: GUD octave support, John W. Eaton, 2007/12/07
- Re: GUD octave support, Nick Roberts, 2007/12/08
- Re: GUD octave support,
John W. Eaton <=
- Re: GUD octave support, Nick Roberts, 2007/12/10
- Re: GUD octave support, John W. Eaton, 2007/12/11
- Re: GUD octave support, Nick Roberts, 2007/12/11
- Re: GUD octave support, Shai Ayal, 2007/12/11
- Re: GUD octave support, Nick Roberts, 2007/12/11
- Re: GUD octave support, Shai Ayal, 2007/12/11
- Re: GUD octave support, John W. Eaton, 2007/12/11
- Re: GUD octave support, John W. Eaton, 2007/12/11
- Re: GUD octave support, Nick Roberts, 2007/12/11