]> git.eshelyaron.com Git - emacs.git/commitdiff
* doc-view.el (doc-view-initiate-display): Add yes-or-no-p if
authorChong Yidong <cyd@stupidchicken.com>
Fri, 17 Jul 2009 19:43:49 +0000 (19:43 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 17 Jul 2009 19:43:49 +0000 (19:43 +0000)
rendering of pngs is not possible instead of messaging a long
description.

lisp/ChangeLog
lisp/doc-view.el

index e3a342032a2d1df24e7f0d8fdb802e8e3abd0cc1..df01e56c679a848b1c843238cff62c4b96ef2595 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-17  Tassilo Horn  <tassilo@member.fsf.org>
+
+       * doc-view.el (doc-view-initiate-display): Add yes-or-no-p if
+       rendering of pngs is not possible instead of messaging a long
+       description.
+
 2009-07-17  David De La Harpe Golden  <david@harpegolden.net>
 
        * w32-fns.el (x-selection-owner-p): New function.
index ce6a7fd0ba95ee2c3243bb577d6eaa6a501dc25d..3ea4fcecfde67a41b9e02a332e505eaec0da2f61 100644 (file)
@@ -1078,15 +1078,14 @@ If BACKWARD is non-nil, jump to the previous match."
                  "editing or viewing the document."))))
     (message
      "%s"
-     (substitute-command-keys
-      (concat "No PNG support available or some conversion utility for "
-             (file-name-extension doc-view-buffer-file-name)" files is missing.  "
-             "Type \\[doc-view-toggle-display] to switch to "
-             (if (eq doc-view-doc-type 'ps)
-                 "ps-mode"
-               "fundamental-mode")
-             ", \\[doc-view-open-text] to show the doc as text in a separate buffer "
-             " or \\[doc-view-kill-proc-and-buffer] to kill this buffer.")))))
+     (concat "No PNG support is available, or some conversion utility for "
+            (file-name-extension doc-view-buffer-file-name)
+            " files is missing."))
+    (if (and (executable-find doc-view-pdftotext-program)
+            (y-or-n-p
+             "Unable to render file.  View extracted text instead? "))
+       (doc-view-open-text)
+      (doc-view-toggle-display))))
 
 (defvar bookmark-make-record-function)