Function: rst-compile-pdf-preview
rst-compile-pdf-preview is an interactive and byte-compiled function
defined in rst.el.gz.
Signature
(rst-compile-pdf-preview)
Documentation
Convert the document to a PDF file and launch a preview program.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
(defun rst-compile-pdf-preview ()
"Convert the document to a PDF file and launch a preview program."
(interactive)
(let* ((tmp-filename (make-temp-file "rst_el" nil ".pdf"))
(pdf-compile-program (cadr (assq 'pdf rst-compile-toolsets)))
(command (format "%s %s %s && %s %s ; rm %s"
pdf-compile-program
buffer-file-name tmp-filename
rst-pdf-program tmp-filename tmp-filename)))
(unless (executable-find pdf-compile-program)
(error "Cannot find executable `%s'" pdf-compile-program))
(unless (executable-find rst-pdf-program)
(error "Cannot find executable `%s'" rst-pdf-program))
(start-process-shell-command "rst-pdf-preview" nil command)
;; Note: you could also use (compile command) to view the compilation
;; output.
))