octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Behavior of "edit" command


From: Daniel J Sebald
Subject: Behavior of "edit" command
Date: Sat, 01 Jun 2013 14:03:06 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

I'm curious people's thoughts on the behavior of "edit". "edit" is a command I never used much because I'm somewhat command-line oriented and will just do a "gvim" from the shell instead of an "edit" from the Octave command line.

The way "edit" works is it will open the specified file for editing. If the file in question is not editable because it is an Octave system script, for example, edit will duplicate that file and place the copy in the first directory in the user's Octave path. That is convenient, if that is what someone wants to do.

On the other hand, with the new GUI/IDE, that often isn't what one wants to do, at least for developers. For example, I was looking at a plotting bug and just wanted to see what the Octave scripts are doing so I thought I'd place some breakpoints in the code. A fast way to open the file, I thought, would be to do:

edit plot
edit image

and then place a breakpoint. But that is duplicating the script file in my <home>/octave subdirectory, which isn't something I wanted. I then have to delete the files that are duplicated, otherwise updates to the system scripts won't take effect. Octave has gotten to the point where I no longer have customized, common scripts.

Could edit have some options for duplicating or not duplicating a file? Could there be a "debug" command that will stop at the first valid line in any used script files? E.g.,

debug("plot (1:50);")

If that were to open the plot.m script, one could then at least "step" and "step into" to move about. Or is this simply a problem I'm experiencing because I'm not setting up my development tree (via ./run-octave) or system installation in a nice way?

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]