Skip to content

Instantly share code, notes, and snippets.

@Metaxal
Created February 11, 2021 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Metaxal/0b65f604bb7c7f5a446e7ad22fff85a2 to your computer and use it in GitHub Desktop.
Save Metaxal/0b65f604bb7c7f5a446e7ad22fff85a2 to your computer and use it in GitHub Desktop.
Prints the contents of the current editor (quickscript)
#lang racket/base
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require quickscript
racket/class)
(script-help-string "Prints the contents of the current editor")
(define-script print-current-editor
#:label "Print current editor"
(λ (selection #:editor ed #:file f)
(send ed print #t #t 'pdf)
#f))
(module url2script-info racket/base
(provide filename url)
(define filename "print-editor.rkt")
(define url "https://gist.github.com/Metaxal/0b65f604bb7c7f5a446e7ad22fff85a2"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment