diff options
| author | Glenn Morris | 2008-10-18 22:30:55 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-10-18 22:30:55 +0000 |
| commit | ca32d854d63ba89c0467925e29dd586fdb66cc84 (patch) | |
| tree | f8767e45e9a500e88849767cf42062d6a78d6c94 | |
| parent | 04d36203696979941183c2811c96ae7a36e91c6d (diff) | |
| download | emacs-ca32d854d63ba89c0467925e29dd586fdb66cc84.tar.gz emacs-ca32d854d63ba89c0467925e29dd586fdb66cc84.zip | |
(doc-view-pdf->txt, doc-view-ps->pdf): Give an error if the needed
external programs were not found.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/doc-view.el | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1470dd09e05..fb0c2f734b1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-10-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * doc-view.el (doc-view-pdf->txt, doc-view-ps->pdf): Give an error if | ||
| 4 | the needed external programs were not found. | ||
| 5 | |||
| 1 | 2008-10-18 Eli Zaretskii <eliz@gnu.org> | 6 | 2008-10-18 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * files.el (trash-directory): Run thru `convert-standard-filename'. | 8 | * files.el (trash-directory): Run thru `convert-standard-filename'. |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 9694e9a70ed..36029fb2f6e 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -654,6 +654,8 @@ Start by converting PAGES, and then the rest." | |||
| 654 | 654 | ||
| 655 | (defun doc-view-pdf->txt (pdf txt callback) | 655 | (defun doc-view-pdf->txt (pdf txt callback) |
| 656 | "Convert PDF to TXT asynchronously and call CALLBACK when finished." | 656 | "Convert PDF to TXT asynchronously and call CALLBACK when finished." |
| 657 | (or doc-view-pdftotext-program | ||
| 658 | (error "You need the `pdftotext' program to convert a PDF to text")) | ||
| 657 | (doc-view-start-process "pdf->txt" doc-view-pdftotext-program | 659 | (doc-view-start-process "pdf->txt" doc-view-pdftotext-program |
| 658 | (list "-raw" pdf txt) | 660 | (list "-raw" pdf txt) |
| 659 | callback)) | 661 | callback)) |
| @@ -684,6 +686,8 @@ Start by converting PAGES, and then the rest." | |||
| 684 | 686 | ||
| 685 | (defun doc-view-ps->pdf (ps pdf callback) | 687 | (defun doc-view-ps->pdf (ps pdf callback) |
| 686 | "Convert PS to PDF asynchronously and call CALLBACK when finished." | 688 | "Convert PS to PDF asynchronously and call CALLBACK when finished." |
| 689 | (or doc-view-ps2pdf-program | ||
| 690 | (error "You need the `ps2pdf' program to convert PS to PDF")) | ||
| 687 | (doc-view-start-process "ps->pdf" doc-view-ps2pdf-program | 691 | (doc-view-start-process "ps->pdf" doc-view-ps2pdf-program |
| 688 | (list | 692 | (list |
| 689 | ;; Avoid security problems when rendering files from | 693 | ;; Avoid security problems when rendering files from |