Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Based on certain previous questions, I figured that if my NotebookBrowseDirectory looked like this

Options[$FrontEnd, NotebookBrowseDirectory]
{NotebookBrowseDirectory -> "/Users/brian/mma"}

then the OSX front end would default to saving new notebooks there. Instead it defaults to saving them in the home directory /Users/brian. Does there exist a variable I can set to make the UI default to saving into a different directory from my homedir?

share|improve this question
    
SetDirectory[dir] sets the current working directory to dir –  acl Dec 2 '12 at 2:58
2  
NotebookBrowseDirectory works on Windows and Linux, but on Mac, we allow the operating system to assert its natural behavior over such things. I'm not now so convinced that this was a good idea, but I haven't finished a proper investigation. So, it's possible this behavior will change in the future. –  John Fultz Dec 2 '12 at 8:22
    
@John Fultz I am glad that Mathematica integrates so nicely with OSX. In my opinion it is a elemental feature of OSX that usage of system wide GUI-logic is encouraged and that most programmes out there play within the 'rules'. Examples where custom interfaces are used (e.g. ditching the top menu bar of OSX - like Matlab does) turn out pretty bad in like 99% of the time and just ruin user experience. –  Sascha Dec 2 '12 at 10:39
    
So would an init.m with a SetDirectory[] command work to do more or less what I want? –  Brian B Dec 2 '12 at 20:23
    
No, what Nasser was suggesting was the opposite of what you're asking. Since the Kernel and FrontEnd are separate processes in the OS, each has its own notion of the "current directory". SetDirectory sets the current directory for the Kernel. NotebookBrowseDirectory would set this for the front end, but as John points out above the OSX FrontEnd currently ignores that. –  Itai Seggev Dec 4 '12 at 4:13

1 Answer 1

On OS X (I'm using 10.9 and Mathematica 9) the file chooser dialogue will remember the last location you used.

So if you Save/Open something to/from /Users/brian/mma, then next time you bring up the file chooser it will show the same directory. This should be convenient.

Per John Fultz's comment above (from Dec 2 '12), it is not possible to set this location on OS X by changing CurrentValue[$FrontEnd, "NotebookBrowseDirectory"]. Quoting the comment:

NotebookBrowseDirectory works on Windows and Linux, but on Mac, we allow the operating system to assert its natural behavior over such things. I'm not now so convinced that this was a good idea, but I haven't finished a proper investigation. So, it's possible this behavior will change in the future.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.