# HG changeset patch # User Tassilo Horn # Date 1294949835 -3600 # Node ID 4a44f74c4f7cc505bd3f78ba39c03c1d58c96a84 # Parent f78d631cd428346f3efbe3c73755dba0096fe7df (doc-view-initiate-display): Fall back to normal mode when doc-view-mode cannot be enabled, also when extracting the document text into a separate buffer (bug#6446). diff -r f78d631cd428 -r 4a44f74c4f7c lisp/ChangeLog --- a/lisp/ChangeLog Thu Jan 13 20:48:26 2011 +0100 +++ b/lisp/ChangeLog Thu Jan 13 21:17:15 2011 +0100 @@ -3,6 +3,9 @@ * doc-view.el (doc-view-open-text): Use meaningful text buffer name. Keep original document's directory as default-directory (bug#6446). + (doc-view-initiate-display): Fall back to normal mode when + doc-view-mode cannot be enabled, also when extracting the document + text into a separate buffer (bug#6446). * simple.el (shell-command): Don't error out if shell command buffer contains text with non-nil read-only property when erasing diff -r f78d631cd428 -r 4a44f74c4f7c lisp/doc-view.el --- a/lisp/doc-view.el Thu Jan 13 20:48:26 2011 +0100 +++ b/lisp/doc-view.el Thu Jan 13 21:17:15 2011 +0100 @@ -1243,11 +1243,11 @@ (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)))) + (when (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)