bugGNU Octave - Bugs: bug #67233, CLI edit does not open Crimson...

 
 

bug #67233: CLI edit does not open Crimson (user's) editor

Submitter:  Andy Potvin <afpotvin>
Submitted:  Mon 23 Jun 2025 05:56:19 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  In Progress Assigned to:  None
Originator Name:  Andy Potvin Open/Closed:  * Open
Release:  * 9.4.0 Release: 
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  10.3.0 (current stable)
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 24 Jun 2025 07:45:02 AM UTC, comment #1: 

Thanks for your report.

The issue with the incorrect input argument type for the `system` call in `edit.m` has already been fixed for Octave 10 in bug #65665:
https://hg.savannah.gnu.org/hgweb/octave/rev/c8a91da569ac

(That could probably have gone on the stable branch for Octave 9 back then...)

The other issue about the path to the Notepad++ executable should be fixed with the following change:
https://hg.octave.org/mxe-octave/rev/c8b78326ad2d

That change should be part of Octave 10.3.0 when it will be released. Or the next successful nightly build that you should be able to download from here: https://nightly.octave.org/#/download

Alternatively, you could manually edit the site `octaverc` file to set the correct path. By default that is installed at "C:\Program Files\GNU Octave\Octave-10.2.0\mingw64\share\octave\site\m\startup\octaverc".

But even if this is set correctly, I see some warnings each time I try to open Notepad++. These warnings disappear after I started Notepad++ once with elevated privileges which apparently creates a few configuration files in the folder with the Notepad++ executable (which is read-only for me without elevated privileges).

CC'ing lostbard: Could these configuration files maybe be created as part of the installation process of Octave somehow?

Markus Mützel <mmuetzel>
Group administrator
Mon 23 Jun 2025 05:56:19 PM UTC, original submission:  

This report is related to 67032 (MS Windows Octave GUI terminal widget should honor standard terminal escape sequences).

On Windows, I use Crimson Editor (yes, I know it's old and no longer supported, but it does things others do not).  Anyway, I can open the editor using:

system('C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\cedt.exe')

but

system('C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\cedt.exe',[],'async')

does nothing.  Perhaps this is a problem with the system function, but I am reporting this as a problem with the edit function because perhaps edit calls system incorrectly (within local function do_edit at line 576)

system (sprintf (undo_string_escapes (editor), ['"' file '"']), [], mode);

Specifically, I set my editor to Crimsom via
val = EDITOR('C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\cedt.exe')
but then the edit function does nothing.  I've traced the inaction to the system call mentioned above; i.e. within the edit local function do_edit at line 576.

It's possible the problem is specific to Crimson editor.  Specifically, if I set
val = EDITOR('C:\Program Files\Notepad++\notepad++.exe')
edit will open the Notepad++ program.  But that begs the question of why edit doesn't work for me from the start.  Specifically, after starting Octave (CLI) I query:

>>val = EDITOR()

val = C:\PROGRA~1\GNUOCT~1\OCTAVE~1.0\mingw64\notepad++\notepad++.exe
but no such directory (or executable) exists for me. So perhaps there's a problem in the built-in EDITOR function?  The "doc EDITOR" says "The default value is taken from the environment variable EDITOR when Octave starts. If the environment variable is not initialized, EDITOR will be set to "emacs"."  In my case, I do not have an EDITOR environment variable.  So... why does EDITOR return "C:\PROGRA~1\GNUOCT~1\OCTAVE~1.0\mingw64\notepad++\notepad++.exe"?

What I don't know:

  • is the reported problem specific to Octave CLI (or is it also a problem with the GUI version);
  • is the reported problem specific to Windows.


Regards,
Andy




Andy Potvin <afpotvin>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mmuetzel
  • -email is unavailable- added by afpotvin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-06-24 mmuetzel StatusNone In Progress
        Planned ReleaseNone 10.3.0 (current stable)
        Carbon-Copy- Added lostbard

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code