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 '15 at 10:38
3 Answers
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
Fix syntax highlighting in
Trace:Unprotect[Trace]; SyntaxInformation[Trace] = {"ArgumentsPattern" -> {_, _., OptionsPattern[]}}; Protect[Trace];Fix Incompatibility of Row and TeXForm: (v9+)
BoxForm`$UseTemplateSlotSequenceForRow = False;Fix SetOptions for CoordinatesToolOptions for DateListPlot?:
DateListPlot; (* preload; do not remove! *) With[ {dv := DownValues[Graphics`DateListPlotDump`iDateListPlot]}, dv = dv /. (fr : FilterRules)[a : Graphics`DateListPlotDump`opts, b_Options] :> fr[Join[a, Options @ Graphics`DateListPlotDump`caller], b] ];Fix TableAlignments -> Left not working
- code too long to include; provided in answer linked above
Fix In 10.1.0 BenchmarkPlot doesn't work?
- see answer to link above
Fix Strange Error on Fresh Kernel (10.2):
With[ {dv := DownValues @ PacletManager`Package`loadWolframLanguageCode}, dv = dv /. wl : HoldPattern[ToString @ $SystemWordLength] :> RuleCondition[wl]; ]Fix Problems with Displaying Output for Summation
InactiveDump`assembleInactiveSumProduct[ {args_, disp_, interp_, char_, tag_, tooltip_, fmt_}] := TemplateBox[ args, tag, DisplayFunction -> Function[disp], InterpretationFunction -> Function[interp], SyntaxForm -> char ]-
Graphics`ArrayPlotDump`Private`stripOptions[opt2___, OP_] := Module[{opt = Flatten @ {opt2}}, Delete[opt, Position[opt, g_?(System`Utilities`StringName[#1] === System`Utilities`StringName[OP] &) -> _, {1} ] ] ]; Fix Conversion to TeX results in infinite recursion
Convert`TeX`ExpressionToTeX; (* preload; do not remove! *) Begin["System`Convert`"] With[{DV := DownValues[`TeXFormDump`maketex], RLS := `CommonDump`RemoveLinearSyntax}, DV = DV /. Verbatim[RLS][arg_, `CommonDump`Recursive -> val_] :> RLS[arg, `CommonDump`ConvertRecursive -> val] ] End[]
Version 10.0
Fix HoldForm doesn't hold form:
(fixed in 10.0.1)
Visualization`Utilities`OptionsDump`unitFormStringQ[HoldForm[s_]] = FalseFix BitShiftRight produces incorrect results in Version 10:
(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)
Statistics`DescriptiveDump`oCommonestSetLength[list_, 1] := Commonest[list][[{1}]]Fix 10.0.2 mapping Association to Dataset warning:
(fixed in 10.1.0)
Begin["TypeSystem`Inference`PackagePrivate`"]; exprType[e_Association] := If[AssociationQ@Unevaluated@e, Struct@MapUn[exprType, e], TypeSystem`UnknownType]; 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[Holonomic`HolonomicFullSimplify];Clear[Holonomic`HolonomicFullSimplify];Prevent Mathematica from eating all my RAM and freezing (most of the time):
$Pre = Function[Null, MemoryConstrained[Unevaluated @ #, 2^32, "Memory Exceeded"], HoldAll]
- 271,378
- 34
- 587
- 1,371
-
1It would probably be good to include a version check before applying any fixes. – Szabolcs Jan 19 '15 at 16:21
-
-
1
If[$VersionNumber == (* number *), ( * do this *)]was probably meant… – J. M.'s missing motivation Jun 19 '15 at 21:40 -
-
1@Mr.Wizard Yes, that's what I meant. It's critical when one has multiple versions installed. Doing this without a version check is dangerous. Someone might copy a fix from here, forget about it, update Mathematica, then something suddenly gets broken. – Szabolcs Apr 10 '19 at 11:48
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
- 1,382
- 9
- 17