>> - Can the output of search_doc be prettified? title of page/section >> rather than the filename, perhaps? You may need some logic/conventions >> to find a sensible title for every page. > > Maybe. Alex Clemesha wrote a serious doc search thing that > he showed me once, but he hasn't integrated it into SAGE yet. > I was getting impatient so I spent exactly one hour to write > the current "search_doc" function, since it's vastly more > useful than absolutely nothing (which is all we had before). > But prettifying, adding context, etc., all takes a lot more > than one hour to implement, and probably Alex has already done > it, to some extent.
Could I see Alex Clemesha's patch for searching docs? I would be a good referee, in any case. In this vein, I have a soon-to-be-submitted patch that gives SAGE an apropos command. If you type `conductor**?', SAGE will list all (callable) objects with conductor in the last dotted name segment along with short docstrings: sage: conductor**? sage.all.mwrank_EllipticCurve.conductor Command: Return the conductor of this curve, computed using Cremona's implementation of Tate's algorithm. sage.databases.cremona.LargeCremonaDatabase.conductor_range Command: Return the range of conductors that are covered by the database. sage.databases.cremona.LargeCremonaDatabase.largest_conductor Command: The largest conductor for which the database is complete. OUTPUT: int -- largest conductor sage.databases.cremona.LargeCremonaDatabase.smallest_conductor Command: The smallest conductor for which the database is complete. (Always 1.) sage.databases.cremona.MiniCremonaDatabase.conductor_range Command: Return the range of conductors that are covered by the database. sage.databases.cremona.MiniCremonaDatabase.largest_conductor Command: The largest conductor for which the database is complete. OUTPUT: int -- largest conductor sage.databases.cremona.MiniCremonaDatabase.smallest_conductor Command: The smallest conductor for which the database is complete. (Always 1.) sage.modular.dirichlet.DirichletCharacter.conductor Command: Computes and returns the conductor of this character. sage.schemes.elliptic_curves.ell_rational_field.EllipticCurve_rational_field.conductor Command: Returns the conductor of the elliptic curve. (Note: many docstrings do not follow conventions!) The formatting sucks because my SAGE emacs code cleans it up and makes it pretty. In the notebook, other code should do the prettifying. It would be nice to uniformize the web based notebook interface, some of the Emacs mode I am writing, and the IPython command line. I have some ideas about how to do this. IPython maintains a history of outputted objects; it is a hash-like object called Out. I think that each interface should check Out for objects that could be displayed in different ways. For example, that apropos command would return an AproposOutput object, that would have a family of repr-like commands: repr itself for IPython, repr_html or repr_notebook for the notebook's fancy html output, and maybe repr_emacs if it should do something special. If there was no special handling, the repr is shown. That seems to generalize the graphics objects already present in SAGE. What do people think? Nick --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---