[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5746202: Make doc-view error message more informati

From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 5746202: Make doc-view error message more informative
Date: Mon, 30 Sep 2019 11:39:48 -0400 (EDT)

branch: master
commit 5746202c182a9c69c732beb29b8507a6e6364799
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Make doc-view error message more informative
    * lisp/doc-view.el (doc-view-initiate-display): Make error message
    clearer (bug#3827).
 lisp/doc-view.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 9fe177a..f75421e 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1715,11 +1715,11 @@ If BACKWARD is non-nil, jump to the previous match."
          (concat "Type \\[doc-view-toggle-display] to toggle between "
                  "editing or viewing the document."))))
-    (message
-     "%s"
-     (concat "No PNG support is available, or some conversion utility for "
-            (file-name-extension doc-view--buffer-file-name)
-            " files is missing."))
+    (if (image-type-available-p 'png)
+        (message "Conversion utility \"%s\" not available for %s"
+                 doc-view-ghostscript-program
+                (file-name-extension doc-view--buffer-file-name))
+      (message "PNG support not available; can't view document"))
     (if (and (executable-find doc-view-pdftotext-program)
              "Unable to render file.  View extracted text instead? "))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]