# How to save palette positions?

I have searched for an answer to this particular Mathematica annoyance, but I could not find an answer anywhere:

### Question

I would really like to be able to save the position and state of my palettes on the screen.

### Details

I will notice in passing that the question of why this is not their default behavior may better be left unasked. Anyhow...

Specifically, I do like the WritingAssistant and a certain configuration of the BasicMathAssistant. Alas, those two insist on both occupying the rightmost edge of the screen, and thus appear on top of each other. Having to rearrange them every single time I open Mathematica gets old quick.

### What I've tried

I have tried fiddling with the Notebook files for these and some other palettes in the Mathematica installation folder, setting them to be editable and auto-save on exit, install them locally under a different name, and various permutations of these, with limited to no success at all. Interestingly, I could get some of the palettes to behave more or less (in particular I managed to locally install the crucially important Notation palette, which isn't even accessible by default under Mathematica 11 anymore, and have it appear where I want it), but the others insist on doing whatever it is the are coded to do, including appearing on top of other palettes. I was able to install a private and renamed copy of the BasicMathAssistant in my local folder, and I swear it appeared in the Palette menu once, but then it disappeared from the menu, even though the local Notebook file encoding the palette was still there.

Long story short, I clearly don't know how to get these palettes to act in a reasonable way. Does anyone know how to get this to work? I have seen Community: Saving palette positions in Windows., but the strategy proposed there does not work for the BasicMathAssistant. It does seem to work for the Notation palette, albeit only after some massaging, by changing the palette's options so it's editable and auto-saves on exit.

• – Kuba Aug 15 '16 at 6:51

Using approach from How to customize the package editor interface?

CopyFile @@ ( FileNameJoin[
{#, "SystemFiles", "FrontEnd", "Palettes", "BasicMathAssistant.nb"}
] & /@ {$InstallationDirectory,$UserBaseDirectory})

SetOptions[
NotebookOpen@%,
{ Saveable -> True,
ClosingAutoSave -> True (*thx to Mr. Wizard*)
}
]


When you move/resize/open another tab, the palette state will be saved.

• Changing the last line to SetOptions[NotebookOpen@%, {Saveable -> True, ClosingAutoSave -> True}] appears to be a complete solution. The palettes already appear to be editable, and this eliminates the save confirmation. – Mr.Wizard Aug 15 '16 at 6:44
• @Mr.Wizard Thanks, I forgot about that, I just checked NotebookAutoSave. – Kuba Aug 15 '16 at 6:45
• Wonderful, this worked. Thanks! – Pirx Aug 15 '16 at 11:26
• Thanks @Kuba for this nice solution. Got tired of having to move the MMA palettes every dang time it loads. – Bill N Nov 25 '16 at 18:25
• Also thanks to @Mr. Wizard for same. – Bill N Nov 25 '16 at 18:26