From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#36357: Wrong Ghostscript program name on MS Win Date: Tue, 21 Apr 2020 20:34:41 +0200 Message-ID: <87lfmowuv2.fsf@gnu.org> References: <90d6e546-8058-1cb3-1d2c-da31f9af0edc@gmail.com> <4291e1bb-c061-39bc-818a-7243544ec52b@gmail.com> <86y2qpj2nv.fsf@gnu.org> <86d0817zdd.fsf@gnu.org> <3f0dcce2-8837-4ef9-8981-3aa5864ca15f@beta.fastmail.com> <868sip7yyi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="100257"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Arash Esbati , 36357@debbugs.gnu.org To: Sebastian Urban Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 21 20:35:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQxjk-000PxK-Mc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 20:35:12 +0200 Original-Received: from localhost ([::1]:34304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQxjj-0000Uq-PI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 14:35:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43882) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQxjb-0000UI-Ic for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQxja-00088x-Lh for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39175) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQxja-00088d-9D for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jQxja-00018t-3t for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Apr 2020 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36357 X-GNU-PR-Package: emacs Original-Received: via spool by 36357-submit@debbugs.gnu.org id=B36357.15874940954372 (code B ref 36357); Tue, 21 Apr 2020 18:35:02 +0000 Original-Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 18:34:55 +0000 Original-Received: from localhost ([127.0.0.1]:50721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQxjS-00018R-QT for submit@debbugs.gnu.org; Tue, 21 Apr 2020 14:34:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQxjP-00018B-VZ for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 14:34:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46239) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQxjK-00083d-NJ; Tue, 21 Apr 2020 14:34:46 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:37279) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jQxjJ-0007ef-LX; Tue, 21 Apr 2020 14:34:45 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 3253827C0054; Tue, 21 Apr 2020 14:34:45 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 21 Apr 2020 14:34:45 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeehgdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecukfhppeekgedrudefvddrle eirddvheegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefke ejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhf mh X-ME-Proxy: Original-Received: from thinkpad-t440p (p548460fe.dip0.t-ipconnect.de [84.132.96.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 64F233065C87; Tue, 21 Apr 2020 14:34:43 -0400 (EDT) In-Reply-To: (Sebastian Urban's message of "Tue, 21 Apr 2020 19:51:45 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178760 Archived-At: Sebastian Urban 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 \#\ /home/horn/Repos/el/emacs/lisp/doc-view.el /tmp/buffer-content-MettTK --- /home/horn/Repos/el/emacs/lisp/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