open gui version in editor?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

open gui version in editor?

Michael Creel
For teaching, it is sometimes useful to explain code before executing it. Also, students seem to have a preference for the GUI interface. So, would it be possible to add a switch to start up Octave with a given script opened in the editor, rather than executed immediately? Something like "octave --force-gui --edit foobar.m"
Reply | Threaded
Open this post in threaded view
|

Re: open gui version in editor?

Mike Miller
On Thu, Oct 16, 2014 at 00:43:33 -0700, Michael Creel wrote:
> For teaching, it is sometimes useful to explain code before executing it.
> Also, students seem to have a preference for the GUI interface. So, would it
> be possible to add a switch to start up Octave with a given script opened in
> the editor, rather than executed immediately? Something like "octave
> --force-gui --edit foobar.m"

How about

  octave --persist --eval "edit foobar.m"

The best part is this works either with or without the GUI.

HTH,

--
mike

Reply | Threaded
Open this post in threaded view
|

Re: open gui version in editor?

Michael Creel
Thanks! I set a click on an .m file to open with

octave --force-gui --persist --eval "edit %f"

and it works perfectly.

Cheers,
M.