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

Submitted by:  Armin Müller <arm_in>
Submitted on:  Mon 23 Jun 2014 02:25:16 PM UTC  
 
Category: GUISeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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.

(file #31615)

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>
Project 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 File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by arm_in (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 25 Jun 2014 09:17:12 PM UTCmtmillerStatusNeed Info=>Confirmed
      Release3.8.1=>dev
      SummaryGUI: allow only one instance=>GUI: allow opening an m-file in the editor of a running instance
    Wed 25 Jun 2014 07:11:40 AM UTCarm_inAttached File-=>Added Octave 3.8.1-4 Windows Install Screen 3.png, #31615
    Tue 24 Jun 2014 08:01:00 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      Item GroupNone=>Feature Request
      StatusNone=>Need Info
      Operating SystemMicrosoft Windows=>Any

    Back to the top


    Powered by Savane 3.1-cleanup