- os-dependent view-result function

main
odanoburu 6 years ago
parent f560ce2cb5
commit 3257d60a35

@ -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