Help and Documentation Utilities
1 Searching in the Documentation
send-main-page
send-language-family-page
perform-search
2 Connecting to racket
search-for
find-help/  lib
find-help
go-to-main-page
3 Compatibility Library
send-main-page
send-language-family-page
perform-search
9.0.0.11

Help and Documentation Utilities🔗ℹ

This section describes utilities designed to connect to documentation and to support bug reports. See also scribble/xref.

1 Searching in the Documentation🔗ℹ

 (require help) package: racket-index

Added in version 1.4 of package racket-index.

procedure

(send-main-page [#:sub sub    
  #:notify notify    
  #:fragment fragment    
  #:query query    
  #:query-table query-table])  any
  sub : path-string? = "index.html"
  notify : (-> (or/c path? string?) void) = void
  fragment : (or/c #f string?) = #f
  query : (or/c #f string?) = #f
  query-table : (hash/c symbol? string? #:immutable #t) = (hash)
Visits the documentation file indicated by sub. If sub is not an absolute path, it is relative to a documentation directory in (get-doc-search-dirs).

When get-doc-open-url returns #f, send-main-page builds a URL that points into the main collection documentation or into the user-specific documentation, depending on the sub argument. Once it finds the path, send-main-page passes the path to notify. The fragment and query arguments are passed to send-url/file, along with the URL. The keys and values in query-table are used as additional query parameters.

When get-doc-open-url returns a URL string, send-main-page appends sub to the URL and passes it to notify. It then appends fragment and query to the URL and passes it on to send-url.

procedure

(send-language-family-page [language-family])  void?

  language-family : (or/c #f string?) = #f
Calls send-main-page. If language-family is the name of a language family that is registered by a definition of language-family in some collection’s "info.rkt", then a starting point and search and navigation configuration for the language family are incoprorated into the call. Otherwise, send-main-page is called with no arguments.

procedure

(perform-search str    
  [context    
  #:language-family language-family])  void?
  str : string?
  context : 
(or/c #f
      string?
      (list/c string? string?))
 = #f
  language-family : (or/c #f string?) = #f
Searches for str in the documentation. The context argument supplies a context for the search or, if it is two strings, a context for the search and a label for that context. The search involves visiting a URL that performs the search.

If language-family is the name of a language family that is registered by a definition of language-family in some collection’s "info.rkt", then search and navigation configuration for the language family are incoprorated into the search request.

2 Connecting to racket🔗ℹ

The help/help-utils library is dynamically loaded by the help form that is available by default in racket.

procedure

(search-for strs)  void?

  strs : (listof string?)
Calls perform-search after concatenating the elements of strs and adding spaces between them.

procedure

(find-help/lib id lib)  void?

  id : symbol?
  lib : module-path?
Visits the documentation page for id as an export of lib.

procedure

(find-help id)  void?

  id : identifier?
Visits the documentation for id.

procedure

(go-to-main-page)  void?

Visits the main entry page for the documentation.

3 Compatibility Library🔗ℹ

The help/search module reexports the bindings of help.

Changed in version 1.2 of package scribble-lib: Added get-doc-open-url support.
Changed in version 1.60: Added the query-table argument.

Added in version 1.60 of package scribble-lib.

See main-perform-search.

Changed in version 1.60 of package scribble-lib: Added the language-family argument.