bugGNU Octave - Bugs: bug #35283, Edit command does not work

 
 

bug #35283: Edit command does not work

Submitted by:  None
Submitted on:  Wed 11 Jan 2012 02:59:15 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Installation Failure
Status: InvalidAssigned to: None
Originator Name: NolanOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.3
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 07 Jun 2012 02:58:38 PM UTC, comment #5:

The default MODE has been switched from "sync" to "async". For the current stable release, 3.6.2, the documentation is correct and describes "async" as the default.

It's probably not a surprise that Windows, which lacks a UNIX-style fork() system call, doesn't handle 'async' well.

Rik <rik5>
Project Administrator
Thu 07 Jun 2012 02:39:47 PM UTC, comment #4:

I'm also having the same issue with edit under Windows (Linux works fine). After a little bit of hacking, it looks like the culprit is the FUNCTION.MODE parameter in line 299 of edit.m:

system (sprintf (FUNCTION.EDITOR, cstrcat ("\"", fileandpath, "\"")), [], FUNCTION.MODE);

Changing it from "async" to "sync" makes it work properly.

The documentation states that "The default is 'sync' (see also 'system')." But, on line 157 of edit.m, it looks like the default is being set to 'async'. Is the documentation in error? Did I misread the function? Or is the function in error (by not agreeing with the documentation)? If the desired result is that async be the default, would it not make sense to add an exception for Windows platforms so that this command would work (edit is a lot more handy than typing "system('gvim filename.m')" for every file I want to edit)?

Anyhow, I've resolved this issue (and you probably can too Mr. Anonymous) by adding
edit mode 'sync';
to my .octaverc file.

Randy <littlemanrkc>
Thu 12 Jan 2012 06:08:32 PM UTC, comment #3:

For the original reporter, try 'help edit'. It details the options for the command and how to set up the editor to use.

In particular, there is an example of how to set up an editor on a Cygwin. I'm quoting directly from the documentation but you will need to insert your own "good editor"

Rik <rik5>
Project Administrator
Wed 11 Jan 2012 11:27:57 PM UTC, comment #2:

We should probably try to set the editor for Cygwin/mingw to something standard on all windows platforms.

Ben Abbott <bpabbott>
Project Member
Wed 11 Jan 2012 03:00:26 PM UTC, comment #1:

I am not sure if this is an Octave bug or a peculiarity of your Windows setup... would it be too inconvenient to bring up this issue in the help mailing list? (help@octave.org)

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 11 Jan 2012 02:59:15 AM UTC, original submission:

I installed Octave with an installer made for Windows. I know MATLAB, so I tried testing a few commands, and those seemed to work fine. I wanted to test writing a script.

I tried to run the emacs editor like this:

octave:1> edit

but, I got a system error that said:

CreateProcess failed -- can't create child process
Error on line 212 column 7 of edit.m

Thank you for your help

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by littlemanrkc (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Jan 2012 05:59:43 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1