bugGNU Octave - Bugs: bug #43922, Renaming/deleting a file/directory...

 
 

bug #43922: Renaming/deleting a file/directory in the command line should silently close/reload affected editor files

Submitted by:  Lutz Mager <rocketsound>
Submitted on:  Sat 03 Jan 2015 01:30:18 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: In ProgressAssigned to: Torsten <ttl>
Originator Name: rocketsoundOpen/Closed: Open
Release: devOperating 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 Jump to the original submission)

Fri 22 Sep 2017 09:24:17 PM UTC, comment #14:

The changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/ba164db1c4a4
which provided a link between delete, unlink, and rmdir and possible open editor files in the gui was backed out, since it leads to a crash on windows systems (see discussion in bug #52069).

Torsten <ttl>
Project MemberIn charge of this item.
Thu 21 Sep 2017 04:03:33 AM UTC, comment #13:

In reply to comment #10:

Hartmut, thanks for testing. rmdir also works for non-empty dirs, when you add the string 's' as extra argument. Open files in the renamed dirs should also be reloaded in the editor.

Torsten <ttl>
Project MemberIn charge of this item.
Wed 20 Sep 2017 07:30:40 PM UTC, comment #12:

bug #52069 is related :-(
(That bug only happens on Windows)

Philip Nienhuis <philipnienhuis>
Project Member
Wed 20 Sep 2017 03:59:32 PM UTC, comment #11:

There's a chance that bug #52069 is related.

Please don't close this report until that is sorted out.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 20 Sep 2017 02:57:01 PM UTC, comment #10:

I've compiled Octave with the changeset from comment #9 (hg id ba164db1c4a4) and tested:

  • everything that I tested in comment #7 is still working properly
  • deleting or unlinking a file from the command line properly closes the editor tab
  • rmdir does only work on empty folders (I think it should be this way). Issuing this command from the command line on the folder which is the current working directory properly deletes the folder and changes the current working directory to its parent folder.

So it looks all fine to me. Possibly remaining issues:

  • movefile command from the commmandline
  • the "jumping tab", see commment #7
Hartmut <hardy>
Mon 18 Sep 2017 03:43:10 AM UTC, comment #9:

Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/ba164db1c4a4
links delete, unlink and rmdir from the terminal window to possibly open files in the editor.

Torsten <ttl>
Project MemberIn charge of this item.
Sun 27 Aug 2017 08:01:55 PM UTC, comment #8:

Thanks for testing, Hartmut. Still missing (but where I am already working on) are the command line tools for renaming or deleting files

  • delete
  • unlink
  • rmdir
  • movefile (this might be tricky)

Maybe there is also a solution for the "jumping tab".

Torsten <ttl>
Project MemberIn charge of this item.
Sun 27 Aug 2017 06:04:47 PM UTC, comment #7:

I have compiled the Octave default branch (hg id 58435a400d4e, including Torsten's new patches for this issue) under (Ubuntu 16.04) linux and it mostly seems FINE to me.

Details:

  • open an m-file in the GUI editor, change its name in the GUI file browser -> name in the GUI editor tab changes silently -> mostly OK.
    • a small "glitch" in this behavior: The renamed GUI editor tab changes its position, during the renaming action. It is the right-most tab after changing the name, regardless of where this editor tab was positioned before the renaming action.
  • open an m-file in the GUI editor, delete it in the GUI file browser -> corresponding tab in GUI editor silently closes -> OK.
  • open an m-file (in a subfolder) in the GUI editor, rename the sub-folder via the GUI file browser -> the editor tab silently stays open and still has this m-file open -> mostly OK.
    • note: in this case the "new" editor tab, also jumps to the right-most position.

I would consider it "nice to have" to fix the "jumping tab" action described above.

But otherwise I think the issue of this bug report has been FIXED by those already commited changesets.

Thanks Torsten!

(Note: I have NOT tested this behavior under Windows OS, as originally reported in commment #0.)

Hartmut <hardy>
Sun 13 Aug 2017 04:11:33 PM UTC, comment #6:

Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/1e54d9aba433
finally covers the last case for changes in the file browser, namely renaming a directory.

Torsten <ttl>
Project MemberIn charge of this item.
Sun 13 Aug 2017 08:23:26 AM UTC, comment #5:

Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/8fa415ff2cb3
provides closing and reloading of a file renamed in the file browser.

Still missing are handling of a renamed directory (removing a directory is only possible if it is empty) and linking deleting/renaming commands in the command line with the editor.

Torsten <ttl>
Project MemberIn charge of this item.
Fri 11 Aug 2017 08:44:57 PM UTC, comment #4:

Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/ba46a8015b26
handles the first case where a file is deleted in the file browser. The possibly related editor tab is silently closed before the file is deleted.

An extension to the case where a file is renamed should be straight forward by using the save-as function of the editor.

Torsten <ttl>
Project MemberIn charge of this item.
Sun 18 Dec 2016 08:13:53 PM UTC, comment #3:

This behavior is still the same in Octave 4.2.0.

Hartmut <hardy>
Tue 10 Feb 2015 06:02:07 PM UTC, comment #2:

Confirmed. It would be nice to share the intelligence between the command line rename and the GUI editor. It will have to wait until after the 4.0 release though.

Rik <rik5>
Project Administrator
Wed 21 Jan 2015 04:05:45 PM UTC, comment #1:

This bug also appears if one tries to rename a top folder (i.e. the folder that contains the file/folder...) of the file. Octave GUI should just silently adopt the new file path in the editor pane (i.e. in the case the file has already been opened). This behavior would be on a par with Matlabs GUI.

Please notice the screenshot below.

(file #32888)

Lutz Mager <rocketsound>
Sat 03 Jan 2015 01:30:18 PM UTC, original submission:

This dialog is shown if one renames a file within Octave that is already opened in the editor pane. As it is right now this dialog is pretty annoying since it should only be triggered when the file has been externally renamed/deleted. If a user renames the file within the GUI, Octave should silently adopt the new file name. If the user deletes a file within the GUI, Octave should silently close the appropriate tab in the editor pane.

(Tested with Octave 3.8.2 on Windows 7 64-Bit (mxe-build) and Fedora 21.)

Lutz Mager <rocketsound>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32888:  Save Dialog.png added by rocketsound (31KiB - image/png)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by rocketsound (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Sep 2017 03:08:03 PM UTCttlDependencies-=>bugs #52069 is dependent
    Sun 13 Aug 2017 04:11:33 PM UTCttlSummaryRenaming/deleting a file within the Octave GUI shouldn't trigger the "file has been deleted or renamed"-dialog=>Renaming/deleting a file/directory in the command line should silently close/reload affected editor files
    Fri 11 Aug 2017 08:48:48 PM UTCttlAssigned toNone=>ttl
    Fri 11 Aug 2017 08:44:57 PM UTCttlStatusConfirmed=>In Progress
    Sun 18 Dec 2016 11:27:47 PM UTCrik5Carbon-CopyRemoved 72865=>-
    Sun 18 Dec 2016 11:27:32 PM UTCrik5Release3.8.2=>dev
    Sun 18 Dec 2016 11:27:17 PM UTCrik5Carbon-CopyRemoved 72865=>-
    Tue 10 Feb 2015 06:02:07 PM UTCrik5StatusNone=>Confirmed
    Wed 21 Jan 2015 04:05:45 PM UTCrocketsoundAttached File-=>Added Save Dialog.png, #32888

    Back to the top


    Powered by Savane 3.1-cleanup1