[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 145/299: Select mgs only if it's functional for non-MikTeX apps.
From: |
Stefan Monnier |
Subject: |
[elpa] 145/299: Select mgs only if it's functional for non-MikTeX apps. |
Date: |
Sun, 02 Nov 2014 03:10:59 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit f46e804dc0142cb3875b01be1ca1b01b40cf8bfd
Author: Tassilo Horn <address@hidden>
Date: Mon Jul 1 08:51:06 2013 +0200
Select mgs only if it's functional for non-MikTeX apps.
* preview.el (preview-gs-command): Test `mgs' for functionality
before using it.
---
preview/ChangeLog | 5 +++++
preview/preview.el | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/preview/ChangeLog b/preview/ChangeLog
index 8d057fe..914a7b2 100644
--- a/preview/ChangeLog
+++ b/preview/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-01 Tassilo Horn <address@hidden>
+
+ * preview.el (preview-gs-command): Test `mgs' for functionality
+ before using it.
+
2013-06-29 Tassilo Horn <address@hidden>
* preview.el (preview-gs-command): Prefer the TeX distro
diff --git a/preview/preview.el b/preview/preview.el
index 77ebaab..db91109 100644
--- a/preview/preview.el
+++ b/preview/preview.el
@@ -347,8 +347,12 @@ LIST consists of TeX dimensions in sp (1/65536 TeX point)."
(defcustom preview-gs-command
(or ;; The GS wrapper coming with TeX Live
(executable-find "rungs")
- ;; The GS wrapper coming with MikTeX
- (executable-find "mgs")
+ ;; The MikTeX builtin GS
+ (let ((gs (executable-find "mgs")))
+ ;; Check if mgs is functional for external non-MikTeX apps.
+ ;; See
http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
+ (when (= 0 (shell-command (concat gs " -q -dNOPAUSE -dBATCH")))
+ gs))
;; Windows ghostscript
(executable-find "GSWIN32C.EXE")
;; standard GhostScript
- [elpa] 136/299: Simplify TeX-doc-backend-alist., (continued)
- [elpa] 136/299: Simplify TeX-doc-backend-alist., Stefan Monnier, 2014/11/01
- [elpa] 135/299: Put coding cookie in elisp header line., Stefan Monnier, 2014/11/01
- [elpa] 138/299: Fix compilation problem due to `dbus-ignore-errors' not being defined., Stefan Monnier, 2014/11/01
- [elpa] 134/299: Fix coding once again., Stefan Monnier, 2014/11/01
- [elpa] 139/299: Generate PROBLEMS file., Stefan Monnier, 2014/11/01
- [elpa] 142/299: Update texinfo files for Git., Stefan Monnier, 2014/11/01
- [elpa] 143/299: Fix spelling errors in tex-buf.el., Stefan Monnier, 2014/11/01
- [elpa] 137/299: Better check for DBUS support., Stefan Monnier, 2014/11/01
- [elpa] 140/299: Remove warnings and docs for ancient preview problems., Stefan Monnier, 2014/11/01
- [elpa] 141/299: Prefer TeX distro GS wrappers., Stefan Monnier, 2014/11/01
- [elpa] 145/299: Select mgs only if it's functional for non-MikTeX apps.,
Stefan Monnier <=
- [elpa] 147/299: Shorter mgs check., Stefan Monnier, 2014/11/01
- [elpa] 144/299: Silence some compilation warnings., Stefan Monnier, 2014/11/01
- [elpa] 148/299: Add default tabular-like env for use in tables., Stefan Monnier, 2014/11/01
- [elpa] 150/299: Move TeX-source-correlate-method documentation to a better section., Stefan Monnier, 2014/11/01
- [elpa] 152/299: Fix fontification of some biblatex macros., Stefan Monnier, 2014/11/01
- [elpa] 146/299: Improve mgs check., Stefan Monnier, 2014/11/01
- [elpa] 151/299: New style `tabulary'., Stefan Monnier, 2014/11/01
- [elpa] 153/299: Revert changes made with commit 7531cca to font-latex.el., Stefan Monnier, 2014/11/01
- [elpa] 156/299: Document some changes for next release., Stefan Monnier, 2014/11/01
- [elpa] 154/299: Update reference from CVS to Git in some comments., Stefan Monnier, 2014/11/01