Search code examples
octave

Changing the Default Editor on Octave comes with an Error Message


I changed my default Octave editor to Notepad++ with the following lines:

EDITOR('C:\Octave\Octave-5.2.0\notepad++\notepad++.exe');
edit ("editor", sprintf ("%s %%S", EDITOR()))
edit mode async

Notepad pops up when I write edit and it works fine. But every time I open Octave CLI, following errors come up:

error: The EDITOR option of edit has been removed.  Use EDITOR() directly.
error: called from
    edit at line 165 column 9
    C:\Users\emiry\.octaverc at line 8 column 1

How can I change the editor without triggering an error?


Solution

  • the warning is coming from the second line

    edit ("editor", sprintf ("%s %%S", EDITOR()))
    

    if you look at help edit you will notice that editor is not used anymore. The setting is your first line

    EDITOR('C:\Octave\Octave-5.2.0\notepad++\notepad++.exe');