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

 
 

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

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Mon 13 Jan 2014 04:44:41 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: Open/Closed: Closed
Release: 3.8.0Operating System: Microsoft Windows

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 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>
Project MemberIn charge of this item.
Tue 14 Jan 2014 11:33:09 PM UTC, comment #13:

http://hg.octave.org/mxe-octave/rev/c8e055d83b9f

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 14 Jan 2014 09:35:43 PM UTC, comment #12:

Patch attached - I will push later today

(file #30275)

John Donoghue <lostbard>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
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>
Project 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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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 File(s):
   
   
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
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by fgnievinski (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
    Sat 18 Jan 2014 01:54:06 PM UTClostbardStatusReady For Test=>Fixed
      Assigned toNone=>lostbard
      Open/ClosedOpen=>Closed
    Tue 14 Jan 2014 11:33:09 PM UTClostbardStatusPatch Submitted=>Ready For Test
    Tue 14 Jan 2014 09:35:43 PM UTClostbardAttached File-=>Added startdir.patch, #30275
      StatusNeed Info=>Patch Submitted
    Mon 13 Jan 2014 05:40:58 PM UTCrik5Operating SystemAny=>Microsoft Windows
      SummaryGUI Editor could offer current directory when saving file=>GUI Editor should use current directory when saving file
    Mon 13 Jan 2014 05:03:45 PM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1