Closed pzinn closed 3 years ago
Good point. I wonder if there are other documentation examples that redefine global methods.
Wait, doesn't "help on" use precomputed documentation output? So maybe you mean that after running installPackage
on the core, it's screwed up for later documentation nodes.
Thanks, on
escaped my mind. Seems like there are 23 or so pages affected by this. Fortunately it looks like only the documentation for on
calls it, so the simplest solution is this:
diff --git a/M2/Macaulay2/packages/Macaulay2Doc/debugging.m2 b/M2/Macaulay2/packages/Macaulay2Doc/debugging.m2
index f4b120a3a..23d168cc2 100644
--- a/M2/Macaulay2/packages/Macaulay2Doc/debugging.m2
+++ b/M2/Macaulay2/packages/Macaulay2Doc/debugging.m2
@@ -299,7 +299,7 @@ document {
are write-protected; fortunately, their methods are not, and can be replaced."
},
EXAMPLE lines ///
- ker Matrix := on(lookup(ker,Matrix),GenerateAssertions=>true,Name=>"ker");
+ ker Matrix := on(lookup(ker,Matrix),GenerateAssertions=>true,Name=>"ker"); -* no-capture-flag *-
f = x -> kernel (x|x);
R = QQ[a..c];
f vars R
yes, it's a one-line fix. was about to add to my PR but you can do it if you prefer
No, go ahead.
help on
redefinesker
which messes up other doc pages usingker
, sayhelp "modules in Macaulay2"
. so it shouldn't be captured (but rather, run the old-fashioned way in a separate M2 instance). will fix.