Merge pull request #7 from odanoburu/master

OS-dependent view-result function
main
Matthew Butterick 6 years ago committed by GitHub
commit 14bfded3f0

@ -34,8 +34,13 @@
(define DOC (DOC-PROC (list . EXPRS)))
(define pdf-path (path-string->pdf-path 'PATH-STRING))
(define (VIEW-RESULT)
(define open-string
(case (system-type 'os)
('macosx "open ~a")
('unix "xdg-open ~a &> /dev/null")
(else (error "Don't know how to open PDF file."))))
(when (file-exists? pdf-path)
(void (system (format "open ~a" pdf-path)))))
(void (system (format open-string pdf-path)))))
(module+ main
(render-pdf DOC pdf-path))))]))))

Loading…
Cancel
Save