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

Submitter:  Lutz Mager <rocketsound>
Submitted:  Sat 03 Jan 2015 01:30:18 PM UTC
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  In Progress Assigned to:  ttl
Originator Name:  rocketsound Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Wed 15 Aug 2018 04:58:19 AM UTC, comment #19: 

Thanks Hartmut

Torsten Lilge <ttl>
Project Member
Tue 14 Aug 2018 09:45:08 PM UTC, comment #18: 

@Torsten: Report is still open?

Hartmut <hardy>
Tue 14 Aug 2018 08:11:14 PM UTC, comment #17: 

Support for movefile is added by cset

Closing the report. It can be reopened if cases are sjowing up that are still not handled correctly.

Torsten Lilge <ttl>
Project Member
Sun 05 Aug 2018 07:59:36 PM UTC, comment #16: 

Preserving the tab position and the current line is now implemented by changeset

Torsten Lilge <ttl>
Project Member
Sat 04 Aug 2018 06:09:28 PM UTC, comment #15: 

re-implements the link between delete, unlink, and rmdir and possible open editor files in the gui without the problems on Windows (at least on my Windows 7 system).

Still missing are

  • handling the movefile command and
  • preserving the tab position when renaming files
Torsten Lilge <ttl>
Project Member
Fri 22 Sep 2017 09:24:17 PM UTC, comment #14: 

The changeset
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 Lilge <ttl>
Project Member
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 Lilge <ttl>
Project Member
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: 

links delete, unlink and rmdir from the terminal window to possibly open files in the editor.

Torsten Lilge <ttl>
Project Member
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 Lilge <ttl>
Project Member
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.


  • 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: 

finally covers the last case for changes in the file browser, namely renaming a directory.

Torsten Lilge <ttl>
Project Member
Sun 13 Aug 2017 08:23:26 AM UTC, comment #5: 

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 Lilge <ttl>
Project Member
Fri 11 Aug 2017 08:44:57 PM UTC, comment #4: 

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 Lilge <ttl>
Project Member
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.

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 Files:

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


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by rocketsound (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 project members can vote.





    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-15 ttl Open/ClosedOpen Closed
    2017-09-22 ttl Dependencies- bugs #52069 is dependent
    2017-08-13 ttl SummaryRenaming/deleting a file within the Octave GUI shouldn't trigger the &quot;file has been deleted or renamed&quot;-dialog Renaming/deleting a file/directory in the command line should silently close/reload affected editor files
    2017-08-11 ttl Assigned toNone ttl
    2017-08-11 ttl StatusConfirmed In Progress
    2016-12-18 rik5 Carbon-CopyRemoved 72865 -
    2016-12-18 rik5 Release3.8.2 dev
    2016-12-18 rik5 Carbon-CopyRemoved 72865 -
    2015-02-10 rik5 StatusNone Confirmed
    2015-01-21 rocketsound Attached File- Added Save Dialog.png, #32888

    Back to the top

    Powered by Savane 3.9