]> git.eshelyaron.com Git - emacs.git/commitdiff
(doc-view-pdf->txt, doc-view-ps->pdf): Give an error if the needed
authorGlenn Morris <rgm@gnu.org>
Sat, 18 Oct 2008 22:30:55 +0000 (22:30 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 18 Oct 2008 22:30:55 +0000 (22:30 +0000)
external programs were not found.

lisp/ChangeLog
lisp/doc-view.el

index 1470dd09e0576485d706e8b65ad4a8e7310958cb..fb0c2f734b1181073c3f7d16014a0ab05f728372 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-18  Glenn Morris  <rgm@gnu.org>
+
+       * doc-view.el (doc-view-pdf->txt, doc-view-ps->pdf): Give an error if
+       the needed external programs were not found.
+
 2008-10-18  Eli Zaretskii  <eliz@gnu.org>
 
        * files.el (trash-directory): Run thru `convert-standard-filename'.
index 9694e9a70ed68d6936b76f1d34dd9e9e00264402..36029fb2f6eadacb921378cedaf407343c18508e 100644 (file)
@@ -654,6 +654,8 @@ Start by converting PAGES, and then the rest."
 
 (defun doc-view-pdf->txt (pdf txt callback)
   "Convert PDF to TXT asynchronously and call CALLBACK when finished."
+  (or doc-view-pdftotext-program
+      (error "You need the `pdftotext' program to convert a PDF to text"))
   (doc-view-start-process "pdf->txt" doc-view-pdftotext-program
                           (list "-raw" pdf txt)
                           callback))
@@ -684,6 +686,8 @@ Start by converting PAGES, and then the rest."
 
 (defun doc-view-ps->pdf (ps pdf callback)
   "Convert PS to PDF asynchronously and call CALLBACK when finished."
+  (or doc-view-ps2pdf-program
+      (error "You need the `ps2pdf' program to convert PS to PDF"))
   (doc-view-start-process "ps->pdf" doc-view-ps2pdf-program
                           (list
                            ;; Avoid security problems when rendering files from