[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3d57c82: Warn about missing executables in RST PDF
From: |
Simen Heggestøyl |
Subject: |
[Emacs-diffs] master 3d57c82: Warn about missing executables in RST PDF preview |
Date: |
Wed, 9 Oct 2019 12:12:21 -0400 (EDT) |
branch: master
commit 3d57c829af571465c261d9f865eeee5ed3cae985
Author: Simen Heggestøyl <address@hidden>
Commit: Simen Heggestøyl <address@hidden>
Warn about missing executables in RST PDF preview
* lisp/textmodes/rst.el (rst-compile-pdf-preview): Warn about missing
executables when attempting to compile and preview an RST file as PDF.
(Bug#30063)
---
lisp/textmodes/rst.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index b7438fb..ce9e633 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -4380,10 +4380,15 @@ buffer, if the region is not selected."
"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"
- (cadr (assq 'pdf rst-compile-toolsets))
+ 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3d57c82: Warn about missing executables in RST PDF preview,
Simen Heggestøyl <=