help-octave
[Top][All Lists]
Advanced

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

Re: creating and editing m-files from Octave command line


From: Ben Abbott
Subject: Re: creating and editing m-files from Octave command line
Date: Tue, 25 Sep 2012 14:27:54 -0400

On Sep 23, 2012, at 5:21 PM, Bowles.Terry wrote:

> Hi –
>  
> I’m new to Octave, migrated from Matlab, having set-up issues. Trying to use 
> the edit command from the Octave command line to create a new m-file if it 
> doesn’t exist, and modify those that do. I have uncommented the EDITOR line 
> in the octaverc file:
>  
> ## Uncomment and change following line for your preferred editor
> EDITOR('C:\\Program Files\\Notepad++\\notepad++.exe');
>  
> and  have added the path where my files exist, also in the octaverc file:
>  
> prefix=octave_config_info('prefix');       % My note: this line was part of 
> the install, found it contains Octave’s home directory, which is what I want.
> addpath(strcat(prefix, '\my_files\'), 1);
>  
> Restarted Octave and verified that the path does indeed contain the 
> ‘my_files’ directory. However, if I cd to that directory and create a new 
> file to edit:
>  
> Octave:15> edit testfnc
>  
> Octave creates a stub of the ‘testfnc’ file for me, but it does not open it 
> in an editor window. Instead I get the following error message:
>  
> error: system: CreateProcess failed – can’t create child process
> error: called from:
> error:     D:\program 
> files\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\miscellaneous\edit.m at line 
> 299, column 7
>  
> And I get the same error message if I try to edit the newly-created stub.
>  
> I frankly cannot understand the edit.m file well enough to diagnose the 
> problem myself. Any help you can provide would be much appreciated. Thanks so 
> much!
>  

I've been using gvim as my editor for several years, but have avoided the 
EDITOR variable.  Instead I added the lines below to my ~/.octaverc.

        edit editor "gvim %s"
        edit mode async

I assume the equivalent approach will work for Notepad++

Ben




reply via email to

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