octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44695] edit() doesn't open editor when --no-g


From: Rik
Subject: [Octave-bug-tracker] [bug #44695] edit() doesn't open editor when --no-gui used
Date: Wed, 01 Apr 2015 23:27:43 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

URL:
  <http://savannah.gnu.org/bugs/?44695>

                 Summary: edit() doesn't open editor when --no-gui used
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Wed 01 Apr 2015 04:27:42 PM PDT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

I have the environment variable EDITOR set to 'gvim -f'.  When running the
Octave CLI it used to be that "edit filename" would open the file in the
external editor.  Now this only works if I run octave with the '--no-gui-libs'
option rather than just '--no-gui'.

The problem seems to be this line in edit.m:


status = __octave_link_edit_file__ (file);


This returns 1 and so the next lines are not executed


if (! status)
  system (sprintf (undo_string_escapes (editor), ['"' file '"']), [], mode);
endif


First, shouldn't Octave be using the C/UNIX convention that 0 means OK and any
non-zero value indicates an error code?

Second, __octave_link_edit_file__ returns 1 both when running the GUI and when
running the CLI, but there is no editor to switch to in the CLI.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44695>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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