bugGNU Octave - Bugs: bug #41443, support drag & drop into the...

 
 

bug #41443: support drag & drop into the console widget

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Mon 03 Feb 2014 11:47:21 AM UTC  
 
Category:  GUI Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

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)

Mon 11 Mar 2019 06:51:33 PM UTC, comment #14: 

Nice feature. We could also offer some kind of context menu when the file is dropped where different actions can be chosen (cd, run, edit, ...).

Torsten Lilge <ttl>
Project Member
Mon 11 Mar 2019 07:58:54 AM UTC, comment #13: 

One thing I find quite handy when working with Matlab is that it adds a "cd" in front of a directory when dragging it to the command window.
Haven't tried that in Octave yet...

Markus Mützel <mmuetzel>
Project Member
Sun 10 Mar 2019 08:16:18 PM UTC, comment #12: 

Markus, thanks for testing.

I am not sure, whether we really should allow running a file that was (maybe accidentally) dragged into the console window. We have the file browser that provides an easy way to run scripts files. Moreover, the current drag & drop functionality simplifies composing the "run" command in the console.

Torsten Lilge <ttl>
Project Member
Sun 10 Mar 2019 07:27:00 PM UTC, comment #11: 

I see the same behaviour on Windows: The path to the file is pasted to the command window.

Markus Mützel <mmuetzel>
Project Member
Sun 10 Mar 2019 07:10:01 PM UTC, comment #10: 

Since drag & drop into the editor was fixed in bug #50559, the remaining issue is what should happen if a file is dragged into the command console.

In Linux, just the path is printed, which is the normal behavior when the receiving application does not know how to handle the file type. Could someone with a recent windows build please test the behavior on windows?

Torsten Lilge <ttl>
Project Member
Thu 16 Mar 2017 01:02:29 PM UTC, comment #9: 

I have opened a separate bug report (bug #50559) for my issue in comment #4, #5, #7, and #8). This seems to be a broken (in linux) feature, and not only a wish (as is this bug report here).

Hartmut <hardy>
Thu 16 Mar 2017 01:17:13 AM UTC, comment #8: 

@Harmut: your wish works for me in Octave 4.2.1 under Windows.

And my other comment pertained to the command window, not the editor window.

Felipe G. Nievinski <fgnievinski>
Tue 14 Mar 2017 07:07:26 PM UTC, comment #7: 

No, my wish fromm comment #4 is NOT yet implemented in Octave 4.2.1.

The current behavior still is:

  • You have an m-file open in the GUI editor.
  • you drag and drop a second m-file to the GUI editor, to be precise you drop it onto the text area of the first m-file.
  • current result: The string "file:///path/to/file.m" is inserted into the code of the first m-file.
  • my expected behavior (i.e. my wish) would be for this common usecase: open the second m-file as an additional tab in the GUI editor.
Hartmut <hardy>
Mon 13 Mar 2017 11:57:42 PM UTC, comment #6: 

May I suggest that when an m-file is dropped in the command window, Octave should run it, i.e., calling

    run('\path\to\file.m')

Currently, dropping only copies the file path:

    \path\to\file.m

Felipe G. Nievinski <fgnievinski>
Mon 13 Mar 2017 11:55:12 PM UTC, comment #5: 

It seems that @Hartmut's request has already been implemented as of version 4.2.1.

Felipe G. Nievinski <fgnievinski>
Sun 20 Nov 2016 07:46:24 PM UTC, comment #4: 

ADDITIONAL WISH: Drag and drop to "text area" of m-file editor.

I regularly use the nice feature "drag and drop m-file to GUI editor" to open the file there.

But this feature currently (Octave 4.2.0) only works when I drop it to the "PANE AREA" of the editor, I mean the space between the editor icons and the editor text area. The space where all the names of the currently opened m-files are listed.

Quite often I happen to drop m-file also to the TEXT AREA of the GUI editor. In this case the editor just inserts the file name into the code, some text like "file:///home/my_user/my_script.m". I would very much prefer to also open this m-file in a new editor pane in this case.

Hartmut <hardy>
Thu 17 Apr 2014 10:43:05 PM UTC, comment #3: 
John Donoghue <lostbard>
Project Member
Wed 16 Apr 2014 10:33:36 PM UTC, comment #2: 

Partial implmentation done with changeset http://hg.savannah.gnu.org/hgweb/octave/rev/992b6354c8c6 that provides drag and drop for the editor pane and unix command window.

John Donoghue <lostbard>
Project Member
Mon 03 Feb 2014 06:35:45 PM UTC, comment #1: 

did a little research and found this:

void QsciScintillaBase::dropEvent(QDropEvent *e)

Felipe G. Nievinski <fgnievinski>
Mon 03 Feb 2014 11:47:21 AM UTC, original submission:  

dropping file in the editor would edit it.

dropping file in the command window would run it,
if it has .m extension, otherwise try to load it as data.

dropping file in the file browser would copy it,
with confirmation dialog.

dropping file in the workspace dock would try to load it as data.

Felipe G. Nievinski <fgnievinski>

 

(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 ttl (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by fgnievinski (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-10 ttl Summarysupport drag & drop => support drag & drop into the console widget
    2014-02-03 jwe Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low

    Back to the top


    Powered by Savane 3.5