bugGNU Octave - Bugs: bug #41220, GUI Editor should use current...

 
 

bug #41220: GUI Editor should use current directory when saving file

Submitter:  Felipe G. Nievinski <fgnievinski>
Submitted:  Mon 13 Jan 2014 04:44:41 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  lostbard
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 17 Jan 2014 08:57:43 PM UTC, comment #14: 

Unless anyone has an issue, I will close this bug.
The file dialog defaults to the start in directory (which is now HOME instead of the octave bin directory)
After the initial setting for the session, it uses the last saved/loaded directory.

John Donoghue <lostbard>
Group Member
Tue 14 Jan 2014 11:33:09 PM UTC, comment #13: 
John Donoghue <lostbard>
Group Member
Tue 14 Jan 2014 09:35:43 PM UTC, comment #12: 

Patch attached - I will push later today

(file #30275)

John Donoghue <lostbard>
Group Member
Tue 14 Jan 2014 04:19:21 PM UTC, comment #11: 

You are right which was why I had mentioned that we could change the path variable.

Copying octave-gui.exe to the bin folder is easier than setting the path environment from the installer, and running into potential issues with dll conflicts, long path environment settings and removing the added path from the path on uninstall.

John Donoghue <lostbard>
Group Member
Tue 14 Jan 2014 02:05:06 PM UTC, comment #10: 

@comment #8:
I don't think that on Windows .dlls must be in the same subdir as an executable; .exes can perfectly find .dlls which live in e.g., windows/system32 (as long as that's in the PATH).
What is happening (AFAIU !) is that -at least on Windows- Octave automatically adds the directory it was started from to the PATH. In case of libexec/ that is a wrong choice.

Having the octave .exes live in libexec/ works as long as it is guaranteed that OCTAVE_HOME/bin is somehow added to the PATH.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 14 Jan 2014 11:21:40 AM UTC, comment #9: 

ok I will change it to install octave-gui.exe into the bin directory, change shortcuts to always use octave-gui and octave-cli and see about setting the start folder to HOME.

John Donoghue <lostbard>
Group Member
Tue 14 Jan 2014 02:41:49 AM UTC, comment #8: 

When I modified the build system to install octave-gui in the $libexec directory, I forgot about the stupid Windows requirement of having the DLL files located in the same directory as the binary.

OTOH, Windows doesn't really need to have the wrapper program that Unixy systems require because there is no need to give up the controlling TTY.  So on Windows systems, running octave-gui directly is perfectly acceptable and there's no need to hide it from users.  So I suppose we could further modify the build system to install octave-gui in $bindir on Windows systems.

John W. Eaton <jwe>
Group administrator
Tue 14 Jan 2014 12:38:39 AM UTC, comment #7: 

Actually, have to run libexec\octave-gui.exe in windows, as doing octave --force-gui still has the terminal window that never closes.

John Donoghue <lostbard>
Group Member
Tue 14 Jan 2014 12:32:46 AM UTC, comment #6: 

Using octave\bin was actually deliberate.

The problem is that  in order to run the octave gui and not have the command window permanently displayed, we have to run lebeec\octave-gui.exe (or octave --force-gui)
https://savannah.gnu.org/bugs/?40689

Either way you end up running octave-gui.exe

But, Octave gui needs all the libs etc that are in the bin directory, which it picks up by it being the start directory.

The other way to do this would be modify the PATH environment variable






John Donoghue <lostbard>
Group Member
Mon 13 Jan 2014 10:18:23 PM UTC, comment #5: 

In the MXE installer, I suppose the Desktop and Start menu shortcuts should rather transfer the user to his home\octave directory after starting Octave (much like right clicking on the shortcut and filling in the field Start in: )
I think NSIS has an option for this.

I find parachuting the user in OCTAVE_HOME\bin a bit messy; I used to start Octave with bacth files where I could easily add a line

cd %USERPROFILE%\octave

(or I adapted the shortcuts afterwards)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 13 Jan 2014 09:50:42 PM UTC, comment #4: 

similar for Open file

Felipe G. Nievinski <fgnievinski>
Mon 13 Jan 2014 05:40:58 PM UTC, comment #3: 

I changed the Operating System field to mark this as a feature request for Windows systems.

Rik <rik5>
Group administrator
Mon 13 Jan 2014 05:28:17 PM UTC, comment #2: 

On my windows machine, it appears to use the current directory at the time octave started (Which is octave\bin in windows)

If you save a file and then create a new one and save it, it will remember the last place saved to and use it, however on a restart of octave, its back to starting at octave\bin

John Donoghue <lostbard>
Group Member
Mon 13 Jan 2014 05:03:45 PM UTC, comment #1: 

This is already the default behavior that I have.  If I do File->New->Script, type some stuff, and then hit the save icon it defaults to the current directory.

The operating system is marked as "Any".  Is this actually a problem only for Windows machines?

Rik <rik5>
Group administrator
Mon 13 Jan 2014 04:44:41 PM UTC, original submission:  

instead of Octave's bin directory

Felipe G. Nievinski <fgnievinski>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30275:  startdir.patch added by lostbard (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by fgnievinski (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-18 lostbard StatusReady For Test Fixed
        Assigned toNone lostbard
        Open/ClosedOpen Closed
    2014-01-14 lostbard StatusPatch Submitted Ready For Test
    2014-01-14 lostbard Attached File- Added startdir.patch, #30275
        StatusNeed Info Patch Submitted
    2014-01-13 rik5 Operating SystemAny Microsoft Windows
        SummaryGUI Editor could offer current directory when saving file GUI Editor should use current directory when saving file
    2014-01-13 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code