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

 
 

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

Submitted by:  Rik <rik5>
Submitted on:  Wed 18 Feb 2015 10:09:43 PM UTC  
 
Category: GUISeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
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.

 

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 <ttl>
Project 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:

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

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 21 Feb 2015 12:42:49 PM UTCttlStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 18 Feb 2015 10:22:42 PM UTCrik5SummaryGUI Ccrl+O opens in wrong directory (1 above pwd)=>GUI Ctrl+O opens in wrong directory

    Back to the top


    Powered by Savane 3.1-cleanup1