Package: auctex / 11.91-2

0004-TeX-view-program-selection-Customize-for-Debian.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: "Davide G. M. Salvetti" <salve@debian.org>
Date: Sat, 14 Jan 2012 22:57:11 +0100
Subject: TeX-view-program-selection: Customize for Debian

* tex.el (TeX-view-program-selection): Look for Evince and use it if
  available, else look for Okular and use it if available, fall back to
  xdvi or xpdf otherwise.

Forwarded: not-needed
---
 tex.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tex.el b/tex.el
index 972110b..650e306 100644
--- a/tex.el
+++ b/tex.el
@@ -1515,10 +1515,12 @@ restarting Emacs."
       (output-pdf "open")
       (output-html "open")))
    (t
-    '(((output-dvi has-no-display-manager) "dvi2tty")
+    `(((output-dvi has-no-display-manager) "dvi2tty")
       ((output-dvi style-pstricks) "dvips and gv")
-      (output-dvi "xdvi")
-      (output-pdf "Evince")
+      (output-dvi ,(if (executable-find "evince") "Evince"
+		     (if (executable-find "okular") "Okular" "xdvi")))
+      (output-pdf ,(if (executable-find "evince") "Evince"
+		     (if (executable-find "okular") "Okular" "xpdf")))
       (output-html "xdg-open"))))
   "Alist of predicates and viewers.
 Each entry consists of a list with two elements.  The first