4
$\begingroup$

When I type Command+O, in Mac OSX 10, Mathematica automatically opens my directory: "Users/john"

How can I change this setting to make it open "Users/john/Documents/Mathematica/GameOfLife" the current folder I am working in?

$\endgroup$
4
  • $\begingroup$ This question is not about Mathematica; since CMD + O is a system-wide hotkey you might have better luck asking on the apple-centric ask different SE $\endgroup$
    – Sascha
    Commented Jan 3, 2016 at 11:18
  • 1
    $\begingroup$ Depending on exactly what you want to do, you might be able to use SystemDialogInput instead of Command+O. This allows you to specify the directory you want to look at as its second argument. $\endgroup$
    – bill s
    Commented Jan 3, 2016 at 14:52
  • $\begingroup$ this is controlled by the $FrontEnd option NotebookBrowseDirectory but I wasn't able to manually set it using the usual methods (meaning I appeared to manually set it but the default directory did not change other than by selecting a new directing via CMD + O) $\endgroup$ Commented Jan 4, 2016 at 1:03
  • 3
    $\begingroup$ To the close voters: note that Jason B (and the comment above) has provided a Mathematica answer to this question. Since there is a Mathematica answer, it doesn't make any sense to close it as off topic for not being a Mathematica question. $\endgroup$
    – C. E.
    Commented Jan 5, 2016 at 9:40

2 Answers 2

5
$\begingroup$

There are many ways to solve your problem. I suggest this one because it very easy to do and undo.

  1. Make sure your Finder windows show a folder sidebar.
  2. In an open Finder window navigate to the parent folder of one you want fast access to -- I will call this 2nd folder the target.
  3. Drag the target's folder icon into the folder sidebar.

When you go back to Mathematica and issue Cmnd+O, the dialog you get will show the target in its sidebar.

  1. Click on the target in the sidebar.

  2. The Open dialog will now show the folder that you want to see.

When you move on from your current project and no longer want quick access to the target, just drag its icon out of the sidebar far enough that you see a cloud icon below the mouse pointer and let go.

$\endgroup$
4
$\begingroup$

What you need is NotebookBrowseDirectory. For example, if I evaluate the following at the top of the notebook

SetOptions[$FrontEnd, 
 NotebookBrowseDirectory -> "~/Documents/Mathematica"]

then I hit Ctrl+O (I'm using Linux so the path structure above and the buttons are for my OS) it opens to that directory.

Then I can just enter the line above in the init.m file located in "~/.Mathematica/Kernel/init.m" and the above line is evaluated every time I start a kernel.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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