[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36357: Wrong Ghostscript program name on MS Win
From: |
Tassilo Horn |
Subject: |
bug#36357: Wrong Ghostscript program name on MS Win |
Date: |
Tue, 21 Apr 2020 20:34:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Sebastian Urban <mrsebastianurban@gmail.com> writes:
> To sum things up "doc-view-ghostscript-program" could look like this:
>
> (defcustom doc-view-ghostscript-program
> (cond
> ((executable-find "gswin64c.exe") "gswin64c")
> ((executable-find "gswin32c.exe") "gswin32c")
> (t "gs"))
> "Program to convert PS and PDF files to PNG."
> :type 'file
> :version "27.1")
Why not use the return value of executable-find? Is there a benefit in
using the non-qualified executable? I've seen that there are other such
occurrences is doc-view.el... I'd just go with:
(defcustom doc-view-ghostscript-program
(or
(executable-find "gswin64c")
(executable-find "gswin32c")
"gs")
"Program to convert PS and PDF files to PNG."
:type 'file
:version "27.1")
> PS If it's alright could it be installed in 27.1? It's not that big
> of a change.
I tend to agree but that's to be decided by Eli (in Cc). That would be
the complete diff from the current version:
--8<---------------cut here---------------start------------->8---
diff -u --label /home/horn/Repos/el/emacs/lisp/doc-view.el --label \#\<buffer\
doc-view.el\> /home/horn/Repos/el/emacs/lisp/doc-view.el
/tmp/buffer-content-MettTK
--- /home/horn/Repos/el/emacs/lisp/doc-view.el
+++ #<buffer doc-view.el>
@@ -153,11 +153,10 @@
:prefix "doc-view-")
(defcustom doc-view-ghostscript-program
- (cond
- ((memq system-type '(windows-nt ms-dos))
- "gswin32c")
- (t
- "gs"))
+ (or
+ (executable-find "gswin64c")
+ (executable-find "gswin32c")
+ "gs")
"Program to convert PS and PDF files to PNG."
:type 'file
:version "27.1")
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
- bug#36357: Wrong Ghostscript program name on MS Win, Sebastian Urban, 2020/04/13
- bug#36357: Wrong Ghostscript program name on MS Win, Arash Esbati, 2020/04/20
- bug#36357: Wrong Ghostscript program name on MS Win, Arash Esbati, 2020/04/21
- bug#36357: Wrong Ghostscript program name on MS Win, Arash Esbati, 2020/04/21
- bug#36357: Wrong Ghostscript program name on MS Win, Tassilo Horn, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Sebastian Urban, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Tassilo Horn, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Eli Zaretskii, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Eli Zaretskii, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Tassilo Horn, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Eli Zaretskii, 2020/04/22
- bug#36357: Wrong Ghostscript program name on MS Win, Tassilo Horn, 2020/04/22