]> git.eshelyaron.com Git - emacs.git/commitdiff
Make doc-view error message more informative
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 30 Sep 2019 15:39:38 +0000 (17:39 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 30 Sep 2019 15:39:38 +0000 (17:39 +0200)
* lisp/doc-view.el (doc-view-initiate-display): Make error message
clearer (bug#3827).

lisp/doc-view.el

index 9fe177a184a3a4f7957847e11728ccf8605b8e21..f75421e7b5ce2f29def11ec26f376bc6c59d435a 100644 (file)
@@ -1715,11 +1715,11 @@ If BACKWARD is non-nil, jump to the previous match."
         (substitute-command-keys
          (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)
             (y-or-n-p
              "Unable to render file.  View extracted text instead? "))