[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opening editor from Octave command line
From: |
Philip Nienhuis |
Subject: |
Re: Opening editor from Octave command line |
Date: |
Tue, 25 Sep 2012 13:20:06 -0700 (PDT) |
Bowles.Terry wrote
> Hi, sorry for such a fundamental question, new to Octave, migrating from
> Matlab.
No problem, we've all been beginners.
> Want to use 'edit' command to create new m-file if it doesn't exist or
> open one in my editor if it does exist:
>
> octave> edit some_fnc
>
> I changed the octaverc file to point to my editor:
>
> ## Uncomment and change following line for your preferred editor
> EDITOR('C:\\Program Files\\Notepad++\\notepad++.exe');
>
> and I added to the path the directory where my functions live:
>
> octave> addpath (some_path/some_dir, 1)
>
> To create a new file in some_dir, I do the following:
>
> octave> cd some_path/some_dir
> octave> edit some_fnc
>
> To edit a file that already exists in some_path/some_dir, I can of course
> skip the 'cd some_path/some_dir' command, since that directory is in the
> path:
>
> octave> edit some_fnc
>
> In either case I get the same 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
First of all, in the README accompanying Octave3.6.1_gcc4.6.2 it should be
mentioned (and AFAIK it is mentioned) that you should not install Octave in
a path containing spaces.
D:\program Files\ violates that rule. This *may* lead to all kinds of
unexpected problems.
=> Advice: reinstall Octave somewhere else, e.g. in
D:\Octave\Octave3.6.1_gcc4.6.2 or so
Then:
Did you install Notepad++ in C:\Program Files\Notepad++ ? (or in
D:\program Files\Notepad++ ?)
In Octave do:
EDITOR
and see if the output matches
C:\Program Files\Notepad++\notepad++.exe
(single backslashes!)
Note that in Octave under Windows, forward slashes work OK as path
separators as well; so in the line you uncommented you could replace the
double backslashes with forward slashes to avoid ambiguities as regards
behavior of backslashes between single/double quotes. (Read up on that in
the manual)
Philip
--
View this message in context:
http://octave.1599824.n4.nabble.com/Opening-editor-from-Octave-command-line-tp4644606p4644625.html
Sent from the Octave - General mailing list archive at Nabble.com.