help-octave
[Top][All Lists]
Advanced

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

edit error


From: Miikka Tulonen
Subject: edit error
Date: Sun, 8 Apr 2012 21:54:04 +0300

>On 7 February 2012 15:10, tappel81 <tappel at clipperwind.com> wrote:
>>
>>
>>
>>
>> Hi Ben,
>>
>>
>>
>> I am running Windows 7
>>
>>
>>
>> I simply downloaded the newer version and thought that by installing it, the
>> older version would have been removed (like a lot of software).
>>
>>
>>
>> I removed the install and only have the older version now.

>(When including parts of previous emails, please post replies below)

>I assume you are using the mingw installers. All the ones I have seen
>act independently of each other. Installing multiple versions should
>not be a problem (provided your disk is big enough!).

>I have something similar with the 3.4.3 mingw. I don't have the
>answer. Here are some curious results so maybe others can help.

>>EDITOR("notepad")
>>EDITOR
>ans = notepad
>>edit foo.m
>error: system: CreateProcess failed -- can't create child process
>error: called from:
>error:   C:\Octave\Octave3.4.3_gcc4.5.2\Octave3.4.3_gcc4.5.2\share\octave\3.4.3\
>m\miscellaneous\edit.m at line 299, column 7
>>system("notepad foo.m")
>ans = 0

>The system call brings up a foo.m that looks like it was created by
>edit.m. I don't have time now to poke around line 299 of edit.m to
>look for clues.

>-- 
>/* andy buckle */


I had this same problem with the edit command with versions 3.4.3 and 3.6.1 on windows 7. Both kept giving me something like this:

error: system: CreateProcess failed -- can't create child process

error: called from:

error:   C:\Octave\Octave3.4.3_gcc4.5.2\Octave3.4.3_gcc4.5.2\share\octave\3.4.3\

m\miscellaneous\edit.m at line 299, column 7

 

Old 3.2.0 opened the editor without problems so I was slightly annoyed by this sort of BS with the newer versions. In my case fiddling with the Octave’s startup script helped to solve the problem. (Took a whole day to figure out this very simple fix)


Go to (and open the file in text editor):

<Octave directory>/share/Octave/site/m/startup/octaverc


Start of the file contains following:

## System-wide startup file for Octave.

##

## This file should contain any commands that should be executed each

## time Octave starts for every user at this site.

 

more off

PS1('octave:\#> ')

## Uncomment and change following line for your preferred editor

## EDITOR('C:\\Program Files\\Notepad++\\notepad++.exe');

prefix=octave_config_info('prefix');

EXEC_PATH([EXEC_PATH,';',prefix,'\gnuplot\binary']);

EXEC_PATH([EXEC_PATH,';',prefix,'\mingw32\bin;',prefix,'\msys\bin']);

EXEC_PATH([EXEC_PATH,';',prefix,'\gs\gs9.04\bin']);

graphics_toolkit('fltk');

EXEC_PATH([EXEC_PATH,';',prefix,'\pstoedit']);

EXEC_PATH([EXEC_PATH,';',prefix,'\fig2dev']);

## Uncomment following 4 lines in order to set env vars for building oct files and pkgs

## regexprep(prefix,'\\','/'); % change backslash to slash

## prefix_e=['/',regexprep(regexprep(prefix,'\\','/'),':','')]; % remove disk double colon

## setenv('LDFLAGS',['-L',prefix_e,'/lib -Wl,--allow-multiple-definition -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc-v2 -Wl,--stack,10485760']);

etc…

etc…

etc…

 

To fix the problem, uncomment the editor setting line and add your preferred editor path (as it tells you to do):

 

## Uncomment and change following line for your preferred editor

## EDITOR('C:\\Program Files\\Notepad++\\notepad++.exe');

à

## Uncomment and change following line for your preferred editor

EDITOR('C:\\Program Files\\Notepad++\\notepad++.exe');

 

 

This has apparently happened before and I found my way towards a working solution (at least for myself) by reading this old discussion:

 http://octave.1599824.n4.nabble.com/edit-m-on-msvc-octave-2-9-13-td1647232.html


I guess the problem originates from the way the editor settings are given (or are NOT given???) in the startup.....or something like that. Anyway, messing with the startup script helped me to get rid of that annoying error message and the editor started working properly.



reply via email to

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