Closed d-torrance closed 3 weeks ago
ah yes, this PR was merged a bit too quickly. I should be able to fix that.
easy fix, though it might be a good time to review these changes and maybe improve them.
I'd like to advocate for reverting to the previous behavior of about
and instead implementing one of the following solutions:
o1 = {0 => Macaulay2Doc::monomialCurveIdeal -- make the ideal of a monomial curve}
headlines
which behaves as follows:
i14 : about "monomialCurveIdeal"
o14 = {0 => Macaulay2Doc::monomialCurveIdeal}
i15 : headlines about "monomialCurveIdeal"
o15 = {0 => Macaulay2Doc::monomialCurveIdeal -- make the ideal of a monomial curve}
i16 : headlines methods monomialCurveIdeal
o16 = {0 => Macaulay2Doc::monomialCurveIdeal -- make the ideal of a monomial curve}
The output formats are the same, and the entries are strings, but we can modify `makeDocumentTag String` to ignore everything after `--`, so `help 0` calls `help "Macaulay2Doc::monomialCurveIdeal -- make the ideal of a monomial curve"` and works as expected. I can open a PR to this effect to demonstrate.
ps: also, can we just silence the afterprint of NumberedVerticalList? It's kind of annoying.
What are your thoughts about this output?
i20 : headlines about quotient
o20 = 0 Saturation :: quotient(...,BasisElementLimit=>...)
1 Saturation :: quotient(...,DegreeLimit=>...)
2 Saturation :: quotient(...,MinimalGenerators=>...) -- ideal or submodule quotient
3 Saturation :: quotient(...,PairLimit=>...)
4 Saturation :: quotient(...,Strategy=>...)
5 Saturation :: quotient(Ideal,Ideal) -- ideal or submodule quotient
6 Saturation :: quotient(Ideal,Number)
7 Saturation :: quotient(Ideal,RingElement) -- ideal or submodule quotient
8 Saturation :: quotient(Module,Ideal) -- ideal or submodule quotient
9 Saturation :: quotient(Module,Module) -- ideal or submodule quotient
10 Saturation :: quotient(Module,Number)
11 Saturation :: quotient(Module,RingElement) -- ideal or submodule quotient
12 Saturation :: quotient(MonomialIdeal,RingElement) -- ideal or submodule quotient
I'm guessing that Paul wants the headlines to be links, but in terminal links are quoted, which is unfortunate. Any suggestions, Doug?
Quotes might not be so bad in the terminal if we define ZZ String
(or maybe RR String
) to do the same thing as * String
so users could move up and press Return in Emacs to view the documentation.
So for example, maybe about
could do something like this?
i1 : RR String := (x, y) -> help y;
i2 : beginDocumentation(); OL {TOH rank, TOH ideal}
o3 = 0. "rank" -- compute the rank
1. "ideal" -- make an ideal
-- after navigating up and pressing return on item #0:
i4 : o3 = 0. "rank" -- compute the rank
o4 = rank -- compute the rank
************************
...
Quotes are bad because they prevent syntax highlighting. We already have help ZZ
and shorthands like this for that reason, I don't think we need more.
Ah, good point
I think this may have started with #3341: