aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTassilo Horn2020-04-22 19:23:23 +0200
committerTassilo Horn2020-04-22 19:24:51 +0200
commitd2836fe71b30dedb39a8d6e1b1705cece30dcf63 (patch)
tree1a791c503b2732dd00f949e85104d3ed10c66fbf
parentfc55f65305e855b31a8594764cfadfb5bf0f107f (diff)
downloademacs-d2836fe71b30dedb39a8d6e1b1705cece30dcf63.tar.gz
emacs-d2836fe71b30dedb39a8d6e1b1705cece30dcf63.zip
Improve the default value of 'doc-view-ghostscript-program'.
* lisp/doc-view.el (doc-view-ghostscript-program): On Windows, try gswin64c, gswin32c, rungs, and mgs. (Bug#36357)
-rw-r--r--lisp/doc-view.el18
1 files changed, 15 insertions, 3 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 3788d797258..8dd0d93071e 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -155,9 +155,21 @@
155(defcustom doc-view-ghostscript-program 155(defcustom doc-view-ghostscript-program
156 (cond 156 (cond
157 ((memq system-type '(windows-nt ms-dos)) 157 ((memq system-type '(windows-nt ms-dos))
158 "gswin32c") 158 (or
159 (t 159 ;; Windows Ghostscript
160 "gs")) 160 (executable-find "gswin64c")
161 (executable-find "gswin32c")
162 ;; The GS wrapper coming with TeX Live
163 (executable-find "rungs")
164 ;; The MikTeX builtin GS Check if mgs is functional for external
165 ;; non-MikTeX apps. Was available under:
166 ;; http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
167 (when-let ((mgs (executable-find "mgs")))
168 (when (= 0 (shell-command
169 (concat (shell-quote-argument mgs)
170 " -q -dNODISPLAY -c quit")))
171 mgs))))
172 (t "gs"))
161 "Program to convert PS and PDF files to PNG." 173 "Program to convert PS and PDF files to PNG."
162 :type 'file 174 :type 'file
163 :version "27.1") 175 :version "27.1")