Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help(ZZ) error #3386

Closed
d-torrance opened this issue Aug 2, 2024 · 7 comments · Fixed by #3387
Closed

help(ZZ) error #3386

d-torrance opened this issue Aug 2, 2024 · 7 comments · Fixed by #3387
Assignees

Comments

@d-torrance
Copy link
Member

I think this may have started with #3341:

i1 : about "monomialCurveIdeal"

o1 = {0 => (Macaulay2Doc "monomialCurveIdeal" -- make the ideal of a monomial curve)}

o1 : NumberedVerticalList

i2 : help 0
stdio:2:1:(3): error: can't determine symbol whose value is document tag: SPAN{"Macaulay2Doc"," ",TOH{new Documen$
@pzinn
Copy link
Contributor

pzinn commented Aug 2, 2024

ah yes, this PR was merged a bit too quickly. I should be able to fix that.

pzinn added a commit to pzinn/M2 that referenced this issue Aug 2, 2024
@pzinn
Copy link
Contributor

pzinn commented Aug 2, 2024

easy fix, though it might be a good time to review these changes and maybe improve them.

@mahrud
Copy link
Member

mahrud commented Aug 2, 2024

I'd like to advocate for reverting to the previous behavior of about and instead implementing one of the following solutions:

  1. add an optional argument to display headlines in the following format:
o1 = {0 => Macaulay2Doc::monomialCurveIdeal -- make the ideal of a monomial curve}
  1. add a new command 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.

@mahrud
Copy link
Member

mahrud commented Aug 2, 2024

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?

@d-torrance
Copy link
Member Author

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
     ************************
...

@mahrud
Copy link
Member

mahrud commented Aug 2, 2024

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.

@d-torrance
Copy link
Member Author

Ah, good point

@mahrud mahrud linked a pull request Aug 2, 2024 that will close this issue
@mahrud mahrud added this to the version 1.24.11 milestone Aug 6, 2024
@mahrud mahrud self-assigned this Aug 10, 2024
@mahrud mahrud closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants