bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1171920a82c3d340b396c41d991a147724560163
parent cb9a9851828ea2dd4d1316bb93d18f8aa30dc1b9
Author: Eli Barzilay <eli@racket-lang.org>
Date:   Mon, 22 Sep 2008 20:05:38 +0000

sample code for diverting searches somewhere online

svn: r11840

original commit: 9728740294b98f9d0705f793141c482e34a45c5e

Diffstat:
Mcollects/help/search.ss | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/collects/help/search.ss b/collects/help/search.ss @@ -14,6 +14,18 @@ [path (if (file-exists? path) path (build-path (find-doc-dir) sub))]) (send-url/file path #:fragment fragment #:query query))) +;; This is an example of changing this code to use the online manuals. +;; Useful in cases like schools that use systems that have problems +;; running a browser on local files (like NEU). If you use this, then +;; it is a good idea to put the documentation tree somewhere local, to +;; have better interaction times and not overload the PLT server. +;; (define doc-url "http://download.plt-scheme.org/doc/4.1/html/") +;; (define (send-main-page #:sub [sub "index.html"] +;; #:fragment [fragment #f] #:query [query #f]) +;; (define (part pfx x) (if x (list pfx x) '())) +;; (send-url (apply string-append doc-url sub +;; (append (part "#" fragment) (part "?" query))))) + (define (perform-search str [context #f]) ;; `context' can be a pre-filter query string to use for a context, ;; optionally a list of one and a label to display for that context.