emacs-devel
[Top][All Lists]
Advanced

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

Patch for #3865: Would somebody please commit on HEAD and branch?


From: Tassilo Horn
Subject: Patch for #3865: Would somebody please commit on HEAD and branch?
Date: Fri, 17 Jul 2009 20:51:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi all,

this patch fixes the inconveniences Reiner pointed out in #3865.  Could
somebody please commit it for me on branch and head?

I'm to busy to read up how to merge between branches with CVS -- I'm
going to marry tomorrow! :-)

--8<---------------cut here---------------start------------->8---
2009-07-16  Tassilo Horn  <address@hidden>

        * 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.
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
Index: lisp/doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.87
diff -u -r1.87 doc-view.el
--- lisp/doc-view.el    2 Apr 2009 21:12:56 -0000       1.87
+++ lisp/doc-view.el    17 Jul 2009 18:44:18 -0000
@@ -1078,15 +1078,12 @@
                  "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 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)
+            (yes-or-no-p "Cannot render file.  View extracted text instead? "))
+       (doc-view-open-text)
+      (doc-view-toggle-display))))
 
 (defvar bookmark-make-record-function) 
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo




reply via email to

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