► |  | raco: Racket Command-Line Tools

1 | raco make: Compiling Source to Bytecode
2 | raco exe: Creating Stand-Alone Executables
3 | raco distribute: Sharing Stand-Alone Executables
4 | raco planet: Automatic Package Distribution
5 | raco pkg: Package Management
6 | raco setup: Installation Management
7 | raco decompile: Decompiling Bytecode
8 | raco demod: Demodularizing Programs
9 | raco link: Library Collection Links
10 | raco pack: Packing Library Collections
11 | raco unpack: Unpacking Library Collections
12 | raco ctool: Working with C Code
13 | raco test: Run tests
14 | raco docs: Documentation Search
15 | raco expand: Macro Expansion
16 | raco read: Reading and Pretty-Printing
17 | raco scribble: Building Documentation
18 | Adding a raco Command
19 | Installation Configuration and Search Paths

▼ | 6 | raco setup: Installation Management

6.1 | Running raco setup
6.2 | Installing ".plt" Archives
6.3 | Controlling raco setup with "info.rkt" Files
6.4 | "info.rkt" File Format
6.5 | Package Dependency Checking
6.6 | API for Setup
6.7 | API for Installing ".plt" Archives
6.8 | API for Finding Installation Directories
6.9 | API for Reading "info.rkt" Files
6.10 | API for Relative Paths
6.11 | API for Collection Names
6.12 | API for Collection Searches
6.13 | API for Platform Specifications
6.14 | API for Cross-Platform Configuration
6.15 | API for Cross-References for Installed Manuals
6.16 | API for Materializing User-Specific Documentation

On this page:

load-collections-xref
make-collections-xref
get-rendered-doc-directories
get-current-doc-state
doc-state-changed?
doc-state?

top ← prev up next →

#### 6.15`` API for Cross-References for Installed Manuals

(require setup/xref) | package: racket-index

> procedure (load-collections-xref [on-load]) → xref?
> on-load : (-> any/c) = (lambda () (void))

Like load-xref, but automatically find all cross-reference files for manuals that have been installed with raco setup.

A cached copy of cross-reference information can be used, in which case on-load is not called.

> > procedure
> > (make-collections-xref |
> > | [ | #:no-user? no-user? |
> > |  | #:no-main? no-main? |
> > |  | #:doc-db db-path |
> > |  | #:quiet-fail? quiet-fail? |
> > |  | #:register-shutdown! register-shutdown!]) |
> → xref?
> no-user? : any/c = #f
> no-main? : any/c = #f
> db-path : (or/c #f path?) = #f
> quiet-fail? : any/c = #f
> register-shutdown! : ((-> any) . -> . any) = void

Like load-collections-xref, but takes advantage of a cross-reference database db-path, when support is available, to delay the loading of cross-reference details until needed.

Cross-reference information is skipped when it is installed in the main installation or in a user-specific location, respectively, if no-main? or no-user? is #t.

If quiet-fail? is true, then errors are suppressed while loading cross-reference information.

The register-shutdown! callback may be called to register a function that closes database connections when the result of make-collections-xref is no longer needed. If register-shutdown! is not supplied or if a function sent to register-shutdown! is never called, database connections will be closed only though a custodian.

> > procedure
> > (get-rendered-doc-directories |  | no-user? |  |  |  |
> > |  | no-main?) |  | → |  | (listof path?)
> no-user? : any/c
> no-main? : any/c

Returns a list of directories for all documentation for all installed collections, omitting documentation that is installed in the main installation or in a user-specific location, respectively, if no-main? or no-user? is #t.

> procedure (get-current-doc-state) → doc-state?

Records the time stamps of files that are touched whenever the documentation is changed.

Added in version 1.2 of package racket-index.

> procedure (doc-state-changed? doc-state) → boolean?
> doc-state : doc-state?

Returns #t when the time stamps of the files in doc-state changed (or new files appeared) and #f otherwise.

If the result is #t, then the documentation in this installation of Racket has changed and otherwise it hasn’t.

Added in version 1.2 of package racket-index.

> procedure (doc-state? v) → boolean?
> v : any/c

A predicate to recognize the result of get-current-doc-state.

Added in version 1.2 of package racket-index.

top ← prev up next →