summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-07-17 19:43:49 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-07-17 19:43:49 +0000
commit715f01fa509d7ccbe3e8d780c40241e26a0872be (patch)
treeef4d58abe11adba5942230a240210ab710a5ece6 /lisp/doc-view.el
parent0de8aeeb2b636808675ad638534fbed8e96fe7b2 (diff)
downloademacs-715f01fa509d7ccbe3e8d780c40241e26a0872be.tar.gz
* 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.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r--lisp/doc-view.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index ce6a7fd0ba9..3ea4fcecfde 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -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)