bugGNU Octave - Bugs: bug #42603, GUI: allow opening an m-file in...

 
 

bug #42603: GUI: allow opening an m-file in the editor of a running instance

Submitter:  Armin Müller <arm_in>
Submitted:  Mon 23 Jun 2014 02:25:16 PM UTC
   
 
Category:  GUI Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 27 Mar 2018 11:12:30 PM UTC, comment #5: 

The solution seems to be to use D-bus.  There C++ bindings to D-bus in Qt http://doc.qt.io/qt-5/qtdbus-index.html

Carnë Draug <carandraug>
Group Member
Wed 25 Jun 2014 09:17:12 PM UTC, comment #4: 

Ok, so the current file association seems like a quick and dirty hack, but there should be a more robust solution that works cross-platform. And presumably addresses this request, that the file will be opened in the editor in a running instance of Octave.

Mike Miller <mtmiller>
Group Member
Wed 25 Jun 2014 09:01:34 PM UTC, comment #3: 

Currently the windows installer sets up an association with octave for .m files.
On clicking on a m-file it will run octave-gui.exe --force-gui --persist --eval "edit %1"



John Donoghue <lostbard>
Group Member
Wed 25 Jun 2014 07:11:40 AM UTC, comment #2: 

Association: This is done by the Windows installer. Option "Register .m file type with Octave". See screenshot attached.

Opening: Well, at least using Windows, clicking a .m file will open it in the Octave editor (not: run. This would take some more care because .m files are ambiguous between script / function). This is also what Matlab does. In addition, clicking a *.mat file will load data into the Matlab workspace.

FYI, here is an explanation of the file name extensions and what they are suppoosed to do:
http://www.mathworks.de/de/help/matlab/matlab_env/associate-files-with-matlab-on-windows-platforms.html

Reuse an existing instance or start a new one: Matlab would reuse the existing instance. It is commonly reported as an error if a new instance is opening, here an example for Windows 7:
http://www.mathworks.com/matlabcentral/answers/93468-why-is-a-new-instance-of-matlab-opened-when-i-double-click-on-a-matlab-file-in-windows-explorer-even

Two instances: I did not test it lately, but imho the most recently used instance will catch the event.


Armin Müller <arm_in>
Tue 24 Jun 2014 08:01:00 PM UTC, comment #1: 

Thanks for your bug report. Did you set up a file association with *.m files to open Octave or was it done for you somehow? I don't know that anyone has yet considered what "opening" a file from the file browser with Octave should do in a graphical environment (regardless of OS). Should it run a script or open it in the editor? Should it load data files into the workspace? Should it reuse an existing instance or start a new one? What if I really want to start two instances of Octave, how to differentiate between user intentions?

See also bug #41998.

Mike Miller <mtmiller>
Group Member
Mon 23 Jun 2014 02:25:16 PM UTC, original submission:  

In the "File Browser" pane, when clicking on a *.m file, it will open in the editor. => OK

When double-clicking a *.m file in Windows Explorer (TM) / File Explorer (TM), a new instance of Octave GUI comprising another editor window will be created. The file will be opened in this second instance editor. => I would prefer to work with just one instance of Octave (unless lauchend explicitly).

Armin Müller <arm_in>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by arm_in (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-27 mtmiller Dependencies- bugs #49054 is dependent
    2014-06-25 mtmiller StatusNeed Info Confirmed
        Release3.8.1 dev
        SummaryGUI: allow only one instance GUI: allow opening an m-file in the editor of a running instance
    2014-06-25 arm_in Attached File- Added Octave 3.8.1-4 Windows Install Screen 3.png, #31615
    2014-06-24 mtmiller Severity3 - Normal 1 - Wish
        Item GroupNone Feature Request
        StatusNone Need Info
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code