branch: externals/auctex
commit 9dba8fdf2af6fb36fcce009a372bcd50adc57f2e
Author: Santiago Saavedra <[email protected]>
Commit: Mosè Giordano <[email protected]>
Make View command work no matter how emacs started
* tex.el (TeX-command-list, TeX-view-program-list-builtin)
(TeX-view-program-selection): Add dvi2tty as a first-class
command, removing it from a load-time quasiquotation so that the
strategy for selecting it or evince goes down to the frame
performing the View command. Fixes bug#21873.
Signed-off-by: Mosè Giordano <[email protected]>
---
ChangeLog | 8 ++++++++
tex.el | 15 ++++++++-------
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 11d8201..3a6939d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-11-10 Santiago Saavedra <[email protected]> (tiny change)
+
+ * tex.el (TeX-command-list, TeX-view-program-list-builtin)
+ (TeX-view-program-selection): Add dvi2tty as a first-class
+ command, removing it from a load-time quasiquotation so that the
+ strategy for selecting it or evince goes down to the frame
+ performing the View command. Fixes bug#21873.
+
2015-11-09 Mos� Giordano <[email protected]>
* tex-info.el: Update copyright years.
diff --git a/tex.el b/tex.el
index 6bd7a95..f4ecfec 100644
--- a/tex.el
+++ b/tex.el
@@ -121,7 +121,7 @@ If nil, none is specified."
;; `TeX-expand-list-builtin' for a description of the % escapes
(defcustom TeX-command-list
- `(("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts)
%`%S%(PDFout)%(mode)%' %t"
+ '(("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts)
%`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil
(plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX")
("LaTeX" "%`%l%(mode)%' %t"
@@ -143,10 +143,7 @@ If nil, none is specified."
(context-mode) :help "Run ConTeXt until completion")
("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX")
("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
- ,(if (or window-system (getenv "DISPLAY"))
- '("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer")
- '("View" "dvi2tty -q -w 132 %s" TeX-run-command t t
- :help "Run Text viewer"))
+ ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer")
("Print" "%p" TeX-run-command t t :help "Print the file")
("Queue" "%q" TeX-run-background nil t :help "View the printer queue"
:visible TeX-queue-command)
@@ -1119,6 +1116,8 @@ all the regular expressions must match for the element to
apply."
(string-match "pdf" (TeX-output-extension)))
(output-html
(string-match "html" (TeX-output-extension)))
+ (has-no-display-manager
+ (not (or window-system (getenv "DISPLAY"))))
(style-pstricks
(TeX-match-style "^pstricks$\\|^pst-\\|^psfrag$"))
(engine-omega
@@ -1275,7 +1274,8 @@ the requirements are met."
("displayline" "displayline %n %o %b" "displayline")
("open" "open %o" "open")))
(t
- `(("xdvi" ("%(o?)xdvi"
+ `(("dvi2tty" ("dvi2tty -q -w 132 %o"))
+ ("xdvi" ("%(o?)xdvi"
(mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"")
((paper-a4 paper-portrait) " -paper a4")
((paper-a4 paper-landscape) " -paper a4r")
@@ -1389,7 +1389,8 @@ restarting Emacs."
(output-pdf "open")
(output-html "open")))
(t
- '(((output-dvi style-pstricks) "dvips and gv")
+ '(((output-dvi has-no-display-manager) "dvi2tty")
+ ((output-dvi style-pstricks) "dvips and gv")
(output-dvi "xdvi")
(output-pdf "Evince")
(output-html "xdg-open"))))