# What bug fixes can be implemented in init.m?

In comments on this question, Mr. Wizard suggested a community wiki to share the bug fixes/workarounds (or possibly other tricks) people load in their init.m. I think this could provide a nice resource.

-
I think this should probably be restricted to bug fixes and workarounds or it becomes too broad. –  Mr.Wizard Aug 16 '13 at 21:54
Should these be version-tagged? –  Yves Klett Aug 17 '13 at 16:54
@Yves I think they should, and so far it looks like everyone has already done that. –  Mr.Wizard Aug 17 '13 at 20:51
Tangentially related: (56728) –  Mr.Wizard Feb 12 at 10:38

Fixes by Mathematica version. Note that unfixed bugs may apply to earlier versions as well; e.g. TableAlignments -> Left not working also applies to version 7.

# Version 10.1

• Unprotect[Trace];
SyntaxInformation[Trace] = {"ArgumentsPattern" -> {_, _., OptionsPattern[]}};
Protect[Trace];

• Fix Incompatibility of Row and TeXForm: (v9+)

BoxForm$UseTemplateSlotSequenceForRow = False;  • DateListPlot; (* preload; do not remove! *) With[ {dv := DownValues[GraphicsDateListPlotDumpiDateListPlot]}, dv = dv /. (fr : FilterRules)[a : GraphicsDateListPlotDumpopts, b_Options] :> fr[Join[a, Options @ GraphicsDateListPlotDumpcaller], b] ];  • code too long to include; provided in answer linked above • code too long to include; see answer to link above # Version 10.0 • (fixed in 10.0.1) VisualizationUtilitiesOptionsDumpunitFormStringQ[HoldForm[s_]] = False  • (fixed in 10.0.2) SetSystemOptions["ParallelOptions" -> {"MachineFunctionParallelThreshold2" -> Infinity}]  • Fix A bug in Commonest in version 10 (see link for an additional performance enhancement): (fixed in 10.0.2) StatisticsDescriptiveDumpoCommonestSetLength[list_, 1] := Commonest[list][[{1}]]  • (fixed in 10.1.0) Begin["TypeSystemInferencePackagePrivate"]; exprType[e_Association] := If[AssociationQ@Unevaluated@e, Struct@MapUn[exprType, e], TypeSystemUnknownType]; End[];  # Version 7 As a version 7 user these likely don't apply to most users but here are mine: • Fix Symbol name slow-down weirdness (hashing problem?): SetSystemOptions["NeedNotReevaluateOptions"->{"UseSymbolLists"->True}];  • Fix a bug in FullSimplify: Unprotect[HolonomicHolonomicFullSimplify];Clear[HolonomicHolonomicFullSimplify];  • Prevent Mathematica from eating all my RAM and freezing (most of the time): $Pre = Function[Null, MemoryConstrained[Unevaluated @ #, 2^32, "Memory Exceeded"], HoldAll]

-
It would probably be good to include a version check before applying any fixes. –  Szabolcs Jan 19 at 16:21
@Szabolcs Would you elaborate on that, please? –  Mr.Wizard Jan 19 at 16:22
If[\$VersionNumber == (* number *), ( * do this *)] was probably meant… –  Guess who it is. Jun 19 at 21:40
@Guess Perhaps so. I prefer to maintain the fixes manually. –  Mr.Wizard Jun 19 at 21:41

Here is one that came from a Wolfram employee so it should be safe to add in version 9:

FindInstance returns Indeterminate in version 9, but not in 8

-

Here's a patch from Adam Strzebonski of Wolfram, which fixes a bug in RootReduce in 9.0.1.

ToNumberField won't recognize Root as explicit algebraic number

-