[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 d2836fe: Improve the default value of 'doc-view-ghostscript-pro
From: |
Tassilo Horn |
Subject: |
emacs-27 d2836fe: Improve the default value of 'doc-view-ghostscript-program'. |
Date: |
Wed, 22 Apr 2020 13:26:32 -0400 (EDT) |
branch: emacs-27
commit d2836fe71b30dedb39a8d6e1b1705cece30dcf63
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
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)
---
lisp/doc-view.el | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 3788d79..8dd0d93 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -155,9 +155,21 @@
(defcustom doc-view-ghostscript-program
(cond
((memq system-type '(windows-nt ms-dos))
- "gswin32c")
- (t
- "gs"))
+ (or
+ ;; Windows Ghostscript
+ (executable-find "gswin64c")
+ (executable-find "gswin32c")
+ ;; The GS wrapper coming with TeX Live
+ (executable-find "rungs")
+ ;; The MikTeX builtin GS Check if mgs is functional for external
+ ;; non-MikTeX apps. Was available under:
+ ;;
http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
+ (when-let ((mgs (executable-find "mgs")))
+ (when (= 0 (shell-command
+ (concat (shell-quote-argument mgs)
+ " -q -dNODISPLAY -c quit")))
+ mgs))))
+ (t "gs"))
"Program to convert PS and PDF files to PNG."
:type 'file
:version "27.1")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-27 d2836fe: Improve the default value of 'doc-view-ghostscript-program'.,
Tassilo Horn <=