bugGNU Octave - Bugs: bug #53894, The file browser tries to open...


bug #53894: The file browser tries to open some m-files as data files instead

Submitted by:  Lars Kindermann <larskindermann>
Submitted on:  Mon 14 May 2018 06:32:19 AM UTC  
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev 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.


( Jump to the original submission)

Thu 24 May 2018 07:50:06 AM UTC, comment #7:

I pushed the patch here:


Closing report as fixed.

Pantxo Diribarne <pantxo>
Project Member
Wed 23 May 2018 07:55:35 AM UTC, comment #6:

The patch for bug #50543 is ready. I'll push it soon to default unless someone wants to give it a try first.

Pantxo Diribarne <pantxo>
Project Member
Tue 15 May 2018 09:57:07 PM UTC, comment #5:

I am currently reworking the patch from bug #50543, which basically will make the file browser rely on "open.m" for any other file than text files with specified extensions.

This is a purely extension based scheme (will eliminate the file recognition step) and is the way ML handles opening files from the GUI.

Pantxo Diribarne <pantxo>
Project Member
Tue 15 May 2018 06:41:29 PM UTC, comment #4:

Obviously, the tooltip was never updated. What about
"Activate for default action, right click for alternatives"?

Torsten <ttl>
Project Member
Tue 15 May 2018 09:32:38 AM UTC, comment #3:

Currently the tooltip when hovering over any file in the filebrowser is misleading, too. It says

Activate to open in editor, right click for altenatives

which is simply wrong in many cases.

Lars Kindermann <larskindermann>
Tue 15 May 2018 12:41:29 AM UTC, comment #2:

Any plain text file that contains no spaces, commas, or tabs on each line is going to look like a Matlab format ASCII file according to Octave's current logic.

The following file also looks like a Matlab ASCII file to Octave's heuristics:

Mike Miller <mtmiller>
Project Administrator
Mon 14 May 2018 07:34:31 PM UTC, comment #1:

It seems that two separate spaces are enough to get the file being opened in the editor. The decision on the file format is done by get_file_format () in load-save.cc.

Torsten <ttl>
Project Member
Mon 14 May 2018 06:32:19 AM UTC, original submission:

Double-clicking some m-files in the file browser widget will not open them in the editor but will try to read them as data-files.

Éxample: opening a file init.m containing just the line

results in

This seems to happen when the file does not contain at least one of several keywords from the octave language.

Even the shebang line #!/usr/bin/octave will not help.

Lars Kindermann <larskindermann>


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

Attach Files:

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 pantxo (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by larskindermann (Submitted the item)

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

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-24 pantxo StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2018-05-23 pantxo StatusConfirmed => Patch Submitted
    2018-05-14 mtmiller Carbon-CopyRemoved 80942 => -
    2018-05-14 mtmiller Severity3 - Normal => 2 - Minor
        StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.4