bugGNU Octave - Bugs: bug #44298, GUI Ctrl+O opens in wrong directory

 
 

bug #44298: GUI Ctrl+O opens in wrong directory

Submitter:  Rik <rik5>
Submitted:  Wed 18 Feb 2015 10:09:43 PM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 21 Feb 2015 12:44:51 PM UTC, comment #3: 

With changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/415864f5b85f
changes in the current working directory are communicated to the editor which in turn uses this directory for opening new files or saving new files.

Torsten Lilge <ttl>
Group Member
Fri 20 Feb 2015 05:47:58 PM UTC, comment #2: 

It seemed to me that the current behavior is for the editor uses the path of the currently active file/tab.  There's a certain logic to that and sometimes it is advantageous, but I agree that probably isn't as good as using pwd.  I often run "edit xyz" where xyz is a library M-script, which places the ced in some system directory somewhere, which isn't where I'd want to open a new file.

In file-editor.cc I see:


  file_editor_tab *fileEditorTab = new file_editor_tab (ced);


where ced is the "current editor directory".

The problem with the pwd() connection is how to get pwd()?  There are many features that would be easy to deal with if there were a mechanism for getting the result of a command from the worker process (i.e., Octave core).

Dan Sebald <sebald>
Wed 18 Feb 2015 10:22:42 PM UTC, comment #1: 

Actually, Ctrl+S doesn't always get it right either.  Here is a more reliable sequence indicating that the synchronization of the working directory is not being communicated to the GUI dialogs.

1) run-octave -f
2) pwd
3) cd ..
4) cd ..
5) Ctrl+O

The directory shown will be the original directory from step 2.

I suppose that there is a separate memory for what the last directory used for a file dialog was.  Maybe that's okay, but it surprised me.

Rik <rik5>
Group administrator
Wed 18 Feb 2015 10:09:43 PM UTC, original submission:  

Steps to reproduce:

1) run-octave -f
2) pwd
 - Check pwd.  It agrees with the File Browser and Current Directory menu bar
3) Click Editor tab
 - Editor is blank, with unnamed tab
4) Ctrl+O, or use File->Open.
5) Directory is one above pwd

Interestingly, Ctrl+S does get the directory correct.

Rik <rik5>
Group administrator

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-21 ttl StatusNone Fixed
        Open/ClosedOpen Closed
    2015-02-18 rik5 SummaryGUI Ccrl+O opens in wrong directory (1 above pwd) GUI Ctrl+O opens in wrong directory

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code