4
$\begingroup$

Recently Mathematica broke on me and I had to reinstall. I lost all of the changes I've made in my Options Inspector over the past year and am attempting to go back and change them again by memory. It's somewhat frustrating. In the future I would like to avoid this.

I'd like to keep a copy of all option settings which I've changed from their default values. It would be great to have a list. There are a lot of options, so I would like this list to contain only the ones that have been changed from default. Is there a way to gather this information programmatically?

This would allow me to create a function that when executed will change all of these options at once so I'm back up and running quickly. It would be nice to see these options in a list to remind me of what I changed. Any ideas on how this would be done?

Mike

$\endgroup$
3
$\begingroup$

According to the "Front End" section of Configuration Files for the Wolfram System, user preferences, including those set by Options Inspector, are located in $UserBaseDirectory in the file "/FrontEnd/init.m". This is a large file, and the options set by Options Inspector are at the end. The list appears to contain all options, whether changed by the user or not.

In the situation described by the OP, it might be possible to save a copy of this file in some safe place and, after Mathematica has been reinstalled, copy the old "/FrontEnd/init.m" file over the reinstalled file to recover the options set by the user. Understand, of course, that the reason that Mathematica broke might be that this very file had became corrupted.

A safer alternative would be to (electronically) compare the installation version of "/FrontEnd/init.m" with the version containing user modifications, and create a file listing the differences. Assuming that those differences are modest in number, they could be reentered by hand using Options Inspector after Mathematica has been reinstalled.

Caveat Emptor: I am no expert in the internals of Mathematica and am merely reporting what I learned in a very brief exploration of the topic. Some related information can be found by searching, say with Google, for "mathematica preferences file".

$\endgroup$
  • $\begingroup$ diff-ing the modified init.m with a pristine copy is a nice idea. $\endgroup$ – J. M. will be back soon Oct 14 '15 at 17:16
  • $\begingroup$ Thank you. Great! This will work. $\endgroup$ – Michael McCain Oct 15 '15 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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