[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

documentation strings and records

  | Date: Tue, 24 March 92, 13:23 -0700
  | From: s9274@srl1.LANL.GOV
  | Eyvind Ness writes:
  |     What I want is a programmatic interface to the CP command "Show
  |     Documentation".
  | As you know from the responses so far, the DOCUMENTATION function
  | retrieves a documentation string and the "Show Documentation" command
  | displays a record from the documentation database. (Another command,
  | "Show Definition Documentation", retrieves a documentation string OR
  | directs you to the online documentation.)
  | In regards to a programmatic interface to "Show Documentation", if you
  | wanted to display the documentation for the DOCUMENTATION function, you
  | could use
  | (sage::lookup-manual-internal
  |   (sage:find-record-group-for-topic-and-type 'documentation 'function))
  | If you wanted to print the documentation, you could provide a printer
  | object as the second argument to SAGE::LOOKUP-MANUAL-INTERNAL.
  | Note that Lisp objects can be provided as symbols, whereas other topics
  | must be provided in quotation marks, e.g.,
  | (sage::lookup-manual-internal
  |   (sage:find-record-group-for-topic-and-type
  |     "How documentation is stored" "section"))
  | John Krieger (s9274@srl1.lanl.gov)
  | Westinghouse Savannah River Company

Great, thanks, John - that's very close to what I wanted.

However, LOOKUP-MANUAL-INTERNAL expects to do its output to a Screen
object, and it seems to be difficult to trap this output and filter out
the pure ASCII documentation string.

For instance, if you give it a NIL arg instead of a Screen object:

     "How documentation is stored" "section")

it pops up a menu offering either the main screen or some of your local

I guess that what I would have to do (if I had lots of extra time and
patience) is to redirect the drawing operations from
LOOKUP-MANUAL-INTERNAL to a temporary bitmap stream and then try to
dissect from it the ASCII doc string.

But as long as I can get most of the on-line CL docstrings from my TI
Explorer without any complications, I think I'll settle for that (sorry
SLUG-friends: for some problem areas the Explorer is a lot easier to
work with ;-)