bugGNU Octave - Bugs: bug #31404, Improvement for edit() which makes...

 
 

bug #31404: Improvement for edit() which makes it work together with console vim

Submitted by:  None
Submitted on:  Thu 21 Oct 2010 11:13:38 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: DuplicateAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 21 Oct 2010 11:13:38 PM UTC, original submission:

I struggled accross the fact that console vim can't be used as editor.
Apparently, this is due to the fact, that edit() uses system() and system() redirect stdout "sometimes".

The code in edit() which fails is
system (sprintf (FUNCTION.EDITOR, strcat ("\"", path, "\"")), [], FUNCTION.MODE);

Having

edit editor "vim %s";
edit mode sync;

The message I get is: "Vim: Warning: Output is not to a terminal"

I suggest the attached patch which does a simple system() call with simply one argument, if the mode is 'sync'.

The patch applies to edit() as of octave 3.2.4

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21754:  edit.m.diff added by None (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated 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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Oct 2010 06:52:53 AM UTCjweStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
    Thu 21 Oct 2010 11:13:38 PM UTCNoneAttached File-=>Added edit.m.diff, #21754

    Back to the top


    Powered by Savane 3.1-cleanup1