From unknown Fri Jun 20 07:18:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36357 <36357@debbugs.gnu.org> To: bug#36357 <36357@debbugs.gnu.org> Subject: Status: Wrong Ghostscript program name on MS Win Reply-To: bug#36357 <36357@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:18:46 +0000 retitle 36357 Wrong Ghostscript program name on MS Win reassign 36357 emacs submitter 36357 Sebastian Urban severity 36357 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 12:04:52 2019 Received: (at submit) by debbugs.gnu.org; 24 Jun 2019 16:04:52 +0000 Received: from localhost ([127.0.0.1]:57711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfRSd-0003qO-Qs for submit@debbugs.gnu.org; Mon, 24 Jun 2019 12:04:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:39778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfRSb-0003qD-Ha for submit@debbugs.gnu.org; Mon, 24 Jun 2019 12:04:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53813) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfRSa-0007Ak-Fc for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 12:04:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfRSZ-0000Kw-IH for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 12:04:48 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:44540) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfRSZ-0000I6-B8 for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 12:04:47 -0400 Received: by mail-wr1-x42e.google.com with SMTP id r16so14484842wrl.11 for ; Mon, 24 Jun 2019 09:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=USBUtNd4MoeO+vfcaELwiV9ozz+MFnHzAs5ILxiQygE=; b=T6f9reOYMEBJqoPzCv04RfyHtCbdw+yi64LVcC4MLh7k7ZbqMJSqkg88TnvbUbS9pY YvgsHE6cI+Zh4YeAxH+vF9fJTlfIh2VTd5mos44HMYHIkpO5QRS/HFHDjZOJpLGtmAC1 B+m6B0ZcX1oMDdJwjiIj9poTBjuuRNazYop+27I9JCfwar3qj/DzBFzi7t8eBvIF7NNa d7nxNZ4h8v9vFLKab6F3YOwD8qzNHZxrAryvLRbyQjo+Hxgj2lUfvh4aOgsdVudn/nLO +ADhmzLlOEWLdUdXDGHjAlWOJ9YVRaojY2icGNTwv5z89v4L5F/QWQPiMmiXvCtWB0ry w7Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=USBUtNd4MoeO+vfcaELwiV9ozz+MFnHzAs5ILxiQygE=; b=Fri6DVtekfV8EzSKLT/ZNd11HjU5RiWSEQgEJZjXrQvtVxJpefUjc2MTQRwsOAgp8q RSdoOV37S+F9ZpiLzR48xvsYdpp02AJw0sduQZNaZsF6OVM+NC4WEfIZSsrcXNmmP8oU 8EI52L8RvbdW4IS2pTZFBQ20Gih/L6gOF3D+s2+BnC5269FUTanum7uGoPlpeUFe08Kw mJbNDCBmI22ktiwfVdPf34ahP02aydGc0e4Hv+qBAq6IDhk5Y4/IRR8+cTMaw15tmn/S oc/JvImjJf4uVnLRD1YdfmHB8Zkpf3Ww8do3ydTgjwfXSescaWv/Xxr/ssLphfJug9qt vS9Q== X-Gm-Message-State: APjAAAWQqlaNnEyObtGo5lVhE3qlfsPzNb4Wf5QVEATylaq2oHRJvpF6 tJYvC35pqV41lU6t8vaTY0rJIZPm X-Google-Smtp-Source: APXvYqzqw5PSQIx0O0tyyhDINDTzRQZv20ZwL0+z+TT1gR5z3ZW/DWJgKXR0hJaOyOt/1WFpGgJJMQ== X-Received: by 2002:adf:e442:: with SMTP id t2mr36874357wrm.286.1561392285563; Mon, 24 Jun 2019 09:04:45 -0700 (PDT) Received: from ?IPv6:2a00:f41:1870:f1b8:ed6d:9890:85f5:2b6d? ([2a00:f41:1870:f1b8:ed6d:9890:85f5:2b6d]) by smtp.gmail.com with ESMTPSA id t1sm14216449wra.74.2019.06.24.09.04.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 09:04:45 -0700 (PDT) To: Bug GNU Emacs From: Sebastian Urban Subject: Wrong Ghostscript program name on MS Win Message-ID: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> Date: Mon, 24 Jun 2019 18:04:41 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Variable 'doc-view-ghostscript-program' has value - 'gs' - which is OK for Unix and VMS, but NOT OK for MS Windows. It should be 'gswin32c'. For details look at the table in "How to Use Ghostscript", chapter "2.1 Help at the command line: gs -h". Perhaps it should be done as list of choice, like in case of 'tex-dvi-view-command'? Or as S. Monnier wrote: "(...) the default could simply (executable-find "gs") and (executable-find "gswin32c") and use whichever was found (...)". Also the same table says 'gsos2' for OS/2 systems. S. U. In GNU Emacs 26.2 (build 1, i686-w64-mingw32) of 2019-04-13 built on CIRROCUMULUS Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749 Windowing system distributor 'Microsoft Corp.', version 6.1.7601 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 04:14:05 2019 Received: (at 36357) by debbugs.gnu.org; 6 Jul 2019 08:14:05 +0000 Received: from localhost ([127.0.0.1]:54167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjfpd-0003Bb-0P for submit@debbugs.gnu.org; Sat, 06 Jul 2019 04:14:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjfpY-0003Ax-JL for 36357@debbugs.gnu.org; Sat, 06 Jul 2019 04:14:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjfpT-0003kI-Fc; Sat, 06 Jul 2019 04:13:55 -0400 Received: from [176.228.60.248] (port=2019 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hjfpS-0007zh-GM; Sat, 06 Jul 2019 04:13:54 -0400 Date: Sat, 06 Jul 2019 11:13:49 +0300 Message-Id: <831rz3a8ci.fsf@gnu.org> From: Eli Zaretskii To: Sebastian Urban , Tassilo Horn In-reply-to: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> (message from Sebastian Urban on Mon, 24 Jun 2019 18:04:41 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win References: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sebastian Urban > Date: Mon, 24 Jun 2019 18:04:41 +0200 > > Variable 'doc-view-ghostscript-program' has value - 'gs' - which is OK > for Unix and VMS, but NOT OK for MS Windows. It should be 'gswin32c'. > For details look at the table in "How to Use Ghostscript", chapter > "2.1 Help at the command line: gs -h". > > Perhaps it should be done as list of choice, like in case of > 'tex-dvi-view-command'? > > Or as S. Monnier wrote: "(...) the default could simply > (executable-find "gs") and (executable-find "gswin32c") and use > whichever was found (...)". > > Also the same table says 'gsos2' for OS/2 systems. Tassilo, any objections to such a change? It sounds TRT to me, but I don't use these features, and don't have Ghostscript installed. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 07:30:14 2019 Received: (at 36357) by debbugs.gnu.org; 6 Jul 2019 11:30:14 +0000 Received: from localhost ([127.0.0.1]:54255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjitS-0008D6-Da for submit@debbugs.gnu.org; Sat, 06 Jul 2019 07:30:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjitR-00086S-CC for 36357@debbugs.gnu.org; Sat, 06 Jul 2019 07:30:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjitK-0003VN-L0; Sat, 06 Jul 2019 07:30:06 -0400 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:46799) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1hjitG-0000R2-1E; Sat, 06 Jul 2019 07:30:03 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 70AF521F32; Sat, 6 Jul 2019 07:30:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 06 Jul 2019 07:30:01 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrfeeigdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfffkfgjfhgfufggtgfgsehtkeigtddtredvnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecukfhppeektddrudekjedrle ekrdeivdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpe epghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [10.166.237.132] (tmo-098-62.customers.d1-online.com [80.187.98.62]) by mail.messagingengine.com (Postfix) with ESMTPA id 215E8380087; Sat, 6 Jul 2019 07:29:59 -0400 (EDT) From: Tassilo Horn To: Eli Zaretskii , Sebastian Urban Date: Sat, 06 Jul 2019 13:29:57 +0200 Message-ID: <16bc70c3f08.27dc.69bc538c4644581689883e654f15bce0@gnu.org> In-Reply-To: <831rz3a8ci.fsf@gnu.org> References: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> <831rz3a8ci.fsf@gnu.org> User-Agent: AquaMail/1.20.0-1462 (build: 102100002) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) No objections from my side. Bye, Tassilo On July 6, 2019 10:13:59 AM Eli Zaretskii wrote: >> From: Sebastian Urban >> Date: Mon, 24 Jun 2019 18:04:41 +0200 >> >> Variable 'doc-view-ghostscript-program' has value - 'gs' - which is OK >> for Unix and VMS, but NOT OK for MS Windows. It should be 'gswin32c'. >> For details look at the table in "How to Use Ghostscript", chapter >> "2.1 Help at the command line: gs -h". >> >> Perhaps it should be done as list of choice, like in case of >> 'tex-dvi-view-command'? >> >> Or as S. Monnier wrote: "(...) the default could simply >> (executable-find "gs") and (executable-find "gswin32c") and use >> whichever was found (...)". >> >> Also the same table says 'gsos2' for OS/2 systems. > > Tassilo, any objections to such a change? It sounds TRT to me, but I > don't use these features, and don't have Ghostscript installed. > > Thanks. > From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 07:51:56 2019 Received: (at 36357-done) by debbugs.gnu.org; 6 Jul 2019 11:51:56 +0000 Received: from localhost ([127.0.0.1]:54300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjjES-0002Fv-4N for submit@debbugs.gnu.org; Sat, 06 Jul 2019 07:51:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjjEP-0002Fh-Lb for 36357-done@debbugs.gnu.org; Sat, 06 Jul 2019 07:51:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjjEK-0002fj-BG; Sat, 06 Jul 2019 07:51:48 -0400 Received: from [176.228.60.248] (port=4736 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hjjEJ-0008Fs-0T; Sat, 06 Jul 2019 07:51:48 -0400 Date: Sat, 06 Jul 2019 14:51:41 +0300 Message-Id: <83imsf8joy.fsf@gnu.org> From: Eli Zaretskii To: Sebastian Urban In-reply-to: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> (message from Sebastian Urban on Mon, 24 Jun 2019 18:04:41 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win References: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36357-done Cc: 36357-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sebastian Urban > Date: Mon, 24 Jun 2019 18:04:41 +0200 > > Variable 'doc-view-ghostscript-program' has value - 'gs' - which is OK > for Unix and VMS, but NOT OK for MS Windows. It should be 'gswin32c'. Fixed, thanks. > Also the same table says 'gsos2' for OS/2 systems. Emacs doesn't currently support building and/or running on OS/2. We don't have a system-type value for that platform. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 07:52:26 2019 Received: (at 36357) by debbugs.gnu.org; 6 Jul 2019 11:52:26 +0000 Received: from localhost ([127.0.0.1]:54306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjjEw-0002HZ-Dq for submit@debbugs.gnu.org; Sat, 06 Jul 2019 07:52:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjjEv-0002HG-D9 for 36357@debbugs.gnu.org; Sat, 06 Jul 2019 07:52:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjjEp-0003El-GJ; Sat, 06 Jul 2019 07:52:20 -0400 Received: from [176.228.60.248] (port=4768 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hjjEm-0008Iw-QS; Sat, 06 Jul 2019 07:52:17 -0400 Date: Sat, 06 Jul 2019 14:52:12 +0300 Message-Id: <83h87z8jo3.fsf@gnu.org> From: Eli Zaretskii To: Tassilo Horn In-reply-to: <16bc70c3f08.27dc.69bc538c4644581689883e654f15bce0@gnu.org> (message from Tassilo Horn on Sat, 06 Jul 2019 13:29:57 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win References: <89e93893-5833-dd73-a198-01a1713e8d90@gmail.com> <831rz3a8ci.fsf@gnu.org> <16bc70c3f08.27dc.69bc538c4644581689883e654f15bce0@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36357 Cc: mrsebastianurban@gmail.com, 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tassilo Horn > CC: <36357@debbugs.gnu.org> > Date: Sat, 06 Jul 2019 13:29:57 +0200 > > No objections from my side. Thanks, I've made the proposed change. From unknown Fri Jun 20 07:18:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 04 Aug 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 18 13:11:29 2020 Received: (at control) by debbugs.gnu.org; 18 Mar 2020 17:11:29 +0000 Received: from localhost ([127.0.0.1]:41285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEcE5-0007T0-2C for submit@debbugs.gnu.org; Wed, 18 Mar 2020 13:11:29 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:46217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEcE3-0007So-Nu for control@debbugs.gnu.org; Wed, 18 Mar 2020 13:11:28 -0400 Received: by mail-wr1-f49.google.com with SMTP id w16so14992021wrv.13 for ; Wed, 18 Mar 2020 10:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=/hSDzowbwe068JZjBFowSNssF2nSxk6S8xr3p5VVPbQ=; b=LnY1ekiYEYDG5NF+T8XRRSGiFe567DmHuNmpWHb2N481e9U/bROBBAjGCSKLKZgoX3 alBWRi3vmqMXNc7cte1qRkqpalZia8AJ4rPieWca8dpP7JFpXm12fVXTYbOqnIOWWli4 8LkGR4efhn3ZBA+f7KLkalIJa1u5tkW4FlI+Lw+UWRe3RHoJvr0PkjjhHy77EGX10qeI NMI7E7NxZYqgmKUje7Pw3mcr02en8AJf2xMlPlNlb+pCdXn7qJ4k9KLmpDyJlXRDeAjG nJ16JXAR4man8SsT0mBP7BJXTve+kKWIpnCOCYUeCA0n0TDK8g1m2nXYbsrzYvDV4s1o fcyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=/hSDzowbwe068JZjBFowSNssF2nSxk6S8xr3p5VVPbQ=; b=VmhEdZ+GCAk7rMYihypNYD+NHXtJ08NemRqRAlr2NeRUCV5LqCUYIsw8+EaF7Aae4a 7oGlsm+D8pm8l7FbAks4QajgD+KCLcJRXJ/wjU1zs9pr3lfVhaOJrY11iUOtr01VcHen +c5HtLmdZTSCz6TAmrMsbqefCUwck4NEVbKTvrcayZNX1CaP6gzESEODJXkAULaBFcqM MkCS+a5F6jcjXsvZrZAmHk0lAuvgyzW4Uofv0ihhKFBEYixO7Rh913U75klQkHSQYNP4 QLu4iURnXQVpFoN4RIRPuoi5aU/1eegSSz7LIR6VmsxpRKIDZQPVPEOoTDqZDcQc4Apl AbvA== X-Gm-Message-State: ANhLgQ3+8sYpPpC1ezu0vA42ssT4Wwhzkq7sF3kT6VQqtGI4zxdEE0oO pyF0+99zBjbDAajK4THG02+4pGsG X-Google-Smtp-Source: ADFU+vsRDP26zImZUUlPdJdxmT4QA6RyzbhALHXZ4B3mIGLqb9bSYKhVtA2/3Jry7FxNVzzdsGb5qw== X-Received: by 2002:adf:f101:: with SMTP id r1mr5089044wro.295.1584551481531; Wed, 18 Mar 2020 10:11:21 -0700 (PDT) Received: from ?IPv6:2a00:f41:184c:351f:39ba:be9:50bc:1817? ([2a00:f41:184c:351f:39ba:be9:50bc:1817]) by smtp.gmail.com with ESMTPSA id p10sm10539935wrx.81.2020.03.18.10.11.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 10:11:19 -0700 (PDT) To: control@debbugs.gnu.org From: Sebastian Urban Message-ID: <836e8593-b819-f7d5-587d-c9c63bef141e@gmail.com> Date: Wed, 18 Mar 2020 18:11:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 36357 Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mrsebastianurban[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.49 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) unarchive 36357 From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 18 13:26:36 2020 Received: (at 36357) by debbugs.gnu.org; 18 Mar 2020 17:26:36 +0000 Received: from localhost ([127.0.0.1]:41303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEcSi-0001PO-CC for submit@debbugs.gnu.org; Wed, 18 Mar 2020 13:26:36 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:55320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEcSh-0001P8-6K for 36357@debbugs.gnu.org; Wed, 18 Mar 2020 13:26:35 -0400 Received: by mail-wm1-f41.google.com with SMTP id 6so4352571wmi.5 for <36357@debbugs.gnu.org>; Wed, 18 Mar 2020 10:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:references:subject:in-reply-to:cc:from:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=GsWhRDt4dKMGg9F33F9760afhWd6fkQe3LcH5uuMEbs=; b=Us3iE1GiaA8hXhQt4+GLqA85q1/8kc8aMTV94oWiBU8eghQG75Jd4sP5N1hjtr50I4 OWQfq4sVaH8dE/IHGecTG0Z5to/RDsHUwgGG4OXwkpnTrcpKuIAvGPMNQakgPlM8sqCi 2go9VhD87RJ399qiDZDgGwePP7/xALR7nI0tn84gJi9nIRMx8yDq/Xnsqfqh2g4LR8i9 PJhCY5cQoLkUqYFMQTfssqnmI1moH/8wZF0CaGqLGJMukN8frUNwImgNGGrCwmNBGjcA 1LTxpmUFpy5rJOXdqLwaq5cAyXvcOWeUKPQ9A6mjUtVJwrTO50gwg+uUOAZOtpBql86p YWnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:subject:in-reply-to:cc:from :message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=GsWhRDt4dKMGg9F33F9760afhWd6fkQe3LcH5uuMEbs=; b=Gq3JMwROm2jGzubBeGSVAbcXLuTBHdABYR28tD/I5F5c2jqaAnFY8+5o/D9QUTF1oB Nx4TOM7Ny82M3iZ11h1OSUihk7xAL0hiUNb7eAppScRp/k7IVwW3/U48IezIgU7M84lU /bXSL8SxMT+HNxV8B7Gj79iVesMurWt0KQzwcGn/Si0mBfyLeCcOH5TWvh92opEk80U3 qu+CJZuUuGElPVa62vn+aXDh7wu6esQ9AHFukmFPhKUiKmiVZ/BFiW8XUwdqdvbJJiYj LwugjxDTlFcgvQFTD6gHXVIrMeGjh/gnla9ZzhD6R7NEN3CIBUr6COI7/u5JSbOI9zHV XjKg== X-Gm-Message-State: ANhLgQ20sv1Fm83efykY75YXJZuHIjRfFP6ndXkvQ1XMu9ZD4bfIULSv 4C4OwpFUtz7M/ivrAnEc6hPdfTwE X-Google-Smtp-Source: ADFU+vtfIJq5HzRPBZsQLA31URoNLvAf2vqgE/PaeTAWbNoVGAicMeqgPwWrAgg/jNNEqb/vVL82yA== X-Received: by 2002:a7b:c947:: with SMTP id i7mr6240233wml.116.1584552389051; Wed, 18 Mar 2020 10:26:29 -0700 (PDT) Received: from ?IPv6:2a00:f41:184c:351f:39ba:be9:50bc:1817? ([2a00:f41:184c:351f:39ba:be9:50bc:1817]) by smtp.gmail.com with ESMTPSA id n2sm2452569wro.25.2020.03.18.10.26.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 10:26:28 -0700 (PDT) To: eliz@gnu.org References: Subject: bug#36357: Wrong Ghostscript program name on MS Win In-Reply-To: <83imsf8joy.fsf@gnu.org> From: Sebastian Urban Message-ID: <588be92b-a3d1-73f2-a49f-4e2fd6da1ed0@gmail.com> Date: Wed, 18 Mar 2020 18:26:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> as I found out recently, adding only gswin32c was half of the >> problem. After upgrading to 64bit OS and installing Ghostscript >> 64bit, there was no gswin32c.exe in the "bin" folder, only >> gswin64.exe and gswin64c.exe. They forgot(?) to add it to the >> table in "Use" documentation, i.e. "gswin32c or gswin64c", instead >> of only "gswin32c", although they pointed this out in "Install" >> documentation >> (https://www.ghostscript.com/doc/9.51/Install.htm#General_Windows). >> So I think another "if" is needed. > > What "if" did you have in mind? Emacs cannot know which version of > Ghostscript is installed, and there's no way I know of to code a > reasonable condition for that. Whether the OS is 64bit or 32bit, or if this is not possible or difficult, then maybe 'system-configuration' variable. It's not perfect, because for example someone can install 32bit GS on 64bit OS, but most probably - on 64bit Win someone will use 64bit Emacs and 64bit GS. This doesn't solve the problem, but better defaults are better defaults. As an simpler alternative, it could be changed to 'gswin64c', because these days people are using 64bit versions usually. > However, the variable is a defcustom, so every user can customize it > to the value which fits their system, if the default doesn't. Of course, but this is plan B. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 18 14:25:08 2020 Received: (at 36357) by debbugs.gnu.org; 18 Mar 2020 18:25:08 +0000 Received: from localhost ([127.0.0.1]:41378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEdNM-0002ur-4r for submit@debbugs.gnu.org; Wed, 18 Mar 2020 14:25:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEdNJ-0002uI-RY for 36357@debbugs.gnu.org; Wed, 18 Mar 2020 14:25:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jEdNE-0007Ev-MM; Wed, 18 Mar 2020 14:25:00 -0400 Received: from [176.228.60.248] (port=3734 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jEdND-0000Xv-Hr; Wed, 18 Mar 2020 14:25:00 -0400 Date: Wed, 18 Mar 2020 20:25:07 +0200 Message-Id: <83a74dfrlo.fsf@gnu.org> From: Eli Zaretskii To: Sebastian Urban In-Reply-To: <588be92b-a3d1-73f2-a49f-4e2fd6da1ed0@gmail.com> (message from Sebastian Urban on Wed, 18 Mar 2020 18:26:31 +0100) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win References: <588be92b-a3d1-73f2-a49f-4e2fd6da1ed0@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 36357@debbugs.gnu.org > From: Sebastian Urban > Date: Wed, 18 Mar 2020 18:26:31 +0100 > > > What "if" did you have in mind? Emacs cannot know which version of > > Ghostscript is installed, and there's no way I know of to code a > > reasonable condition for that. > > Whether the OS is 64bit or 32bit A 64-bit OS can perfectly well run 32-bit executables. > This doesn't solve the problem, but better defaults are better > defaults. I'm not convinced this is a better default. My 64-bit Windows system is full of 32-bit executables, both those that I compiled and those I did not. If your proposal is a better default, how come no one complained about this? From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 18 15:23:39 2020 Received: (at 36357) by debbugs.gnu.org; 18 Mar 2020 19:23:39 +0000 Received: from localhost ([127.0.0.1]:41416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEeHz-0004Qz-Cv for submit@debbugs.gnu.org; Wed, 18 Mar 2020 15:23:39 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:43494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEeHy-0004Qm-5E for 36357@debbugs.gnu.org; Wed, 18 Mar 2020 15:23:38 -0400 Received: by mail-wr1-f47.google.com with SMTP id b2so25691217wrj.10 for <36357@debbugs.gnu.org>; Wed, 18 Mar 2020 12:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ICRLxnziprS46OWKOPlFQkUaCsRBcZ1F+QqSpAe4Ux0=; b=I9F3Ba0FVhw9PjhJokOzBADNJHZLRgYvhwVPhDJ7ImUYgJuh6uhuanKpSu3cDx9Rim VRV3mvfDmoa2Bd3kXY0FU6W1A7IIi0QInuO0Qp7k2Fj7j9dSFBRGDcRydE+nfsqhvQZm mlxcwtebXgsHWWjHTcymvVDTGj3w231TO4LsFXwy53oW9IpVVRcSYX4zqE5MmJoPPIZp 0URQ09KJGEH59Tm3ZtybrLvBFCzJoYBXTKV2I2IU4w35Zm0CkQEdiaoE8bq2JYnFuVhg j74oZonsAUSutEA1ZdSsqOF9cG9plo4XALhccgxThOurD+lE1VtfLarmoyHlPE2yHuzI hzNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ICRLxnziprS46OWKOPlFQkUaCsRBcZ1F+QqSpAe4Ux0=; b=ruMoIEbujgcDfwD+fQFuP4Nt1sQo3V9j2hfLSz66JYcZEj81k10YAKfSLipG/p3ip4 xH2uP5x1P0OECR7RTJ4XvU4tM2Mc5cEFSapndfwaXvgz1NWFbBMQjtz5JWpYe3+59kpX WndhhsjfdYMPY01xasoYW8UMeA+xudYn12wlXK8SNCjG3/Q0ONprB35f5591Wmc0ooOO h20I8VmjivfCq4/w3GtbiiMQseSh0MZfZepORFnin8Ef8CyvFZ6bXg5GhPGwdYyDojBh fxJpMjcSk4K/vFJPJLZ2+4Ely/o0+c10kYA80Cux6T8Zro246jO1dug6XTM1exnH7Rm6 zQbA== X-Gm-Message-State: ANhLgQ2jRwx44jtpCJiMJ/EpRZcjgj2AzobPI2lNKz5MDNcBKf9PC3bb 7f1eMpE163we/nnwKwUfoTU06QV8 X-Google-Smtp-Source: ADFU+vtg/y20oPjwU/dFlRO4HfgD1alD278Md48szfgtZaBqwz0I+hqUjPT/4D7XGrSdK5qJvMdN3Q== X-Received: by 2002:adf:e881:: with SMTP id d1mr7098403wrm.262.1584559411924; Wed, 18 Mar 2020 12:23:31 -0700 (PDT) Received: from ?IPv6:2a00:f41:184c:351f:39ba:be9:50bc:1817? ([2a00:f41:184c:351f:39ba:be9:50bc:1817]) by smtp.gmail.com with ESMTPSA id i1sm11168398wrs.18.2020.03.18.12.23.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 12:23:31 -0700 (PDT) Subject: bug#36357: Wrong Ghostscript program name on MS Win To: Eli Zaretskii References: <588be92b-a3d1-73f2-a49f-4e2fd6da1ed0@gmail.com> <83a74dfrlo.fsf@gnu.org> From: Sebastian Urban Message-ID: <90d6e546-8058-1cb3-1d2c-da31f9af0edc@gmail.com> Date: Wed, 18 Mar 2020 20:23:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <83a74dfrlo.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I'm not convinced this is a better default. My 64-bit Windows > system is full of 32-bit executables, both those that I compiled and > those I did not. Well you're not a beginner and you can easily change settings, because you know which and how, and we're talking about defaults, which should help newcomers as much as possible. If 64bit OS is in use and the program has two versions - 32bit & 64bit - user will most likely choose 64bit version of the program. 64bit software is popular now and leaving (in upcoming Emacs 27) 'gswin32c' as default is... outdated? Perhaps something like (idea, not code): if 'system-configuration' == 64bit use gswin64c else use gswin32c could make setting the default a little bit better. Maybe there is better variable for this. Again, as an alternative, a change to 'gswin64c' from 'gswin32c' would be also appreciated, as more up-to-date solution. > If your proposal is a better default, how come no one complained > about this? They don't use packages that use Ghostscript, don't care that much and change tool, blame Windows for not working... kind of "who knows". :) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 13 15:10:42 2020 Received: (at 36357) by debbugs.gnu.org; 13 Apr 2020 19:10:42 +0000 Received: from localhost ([127.0.0.1]:60814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jO4Ti-00070z-5B for submit@debbugs.gnu.org; Mon, 13 Apr 2020 15:10:42 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:41143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jO4Tg-00070l-IC for 36357@debbugs.gnu.org; Mon, 13 Apr 2020 15:10:40 -0400 Received: by mail-lj1-f175.google.com with SMTP id n17so9872598lji.8 for <36357@debbugs.gnu.org>; Mon, 13 Apr 2020 12:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:references:subject:in-reply-to:from:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=chEdpcLDPe5WI5jUFhF74gSG8WWj32jkod5DROGL6xw=; b=kJtL8mymLJYnWpk4xWk9AV+diWUaAWD4QTYO6E8VwJwghCLlYRhsKPG0aloL/ZfLCz L/6GDit53wTacTdcFxxM1MUkbTbtBZOcFO2ohVAyT0LZMWqDxHBbOWTe9sOBSaGcU8RP qmsEBiCaLf+8cpscMpkSFpSz9ikSZRA7RQsAi8OOcnOiVkGK3QVLUgIGKcTPgpvnbfVP DIxuDhk7O/iU8Gc5RsbwLzT7D5+GFm0a9S4v07sid0zb1VF4QT+M4yE1GwkNb7SUbDaF uFPtPlXsoAJOLYKm1ZMMr3SkJntKGxumMdjeFo+Bhf01aYgeRANKANvECC0Qu2jFolF/ Tb+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:subject:in-reply-to:from :message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=chEdpcLDPe5WI5jUFhF74gSG8WWj32jkod5DROGL6xw=; b=WlwNMuJ0+L1AJJX1pzMuVHKaLHsjThWuFHMVYBBGwg4xj74OvazhK5R9GRadGuZO+Q 6eO69ciucR8xY5d3OvjbRl9CNATxZcETbayNCfisQAFGmS3+Myu9wVbSoKwfofES6E1d QaQOZlPjbEUHucRx3uGtrAYpvvzrExwGZioXxc3ZrTdc8A4c4O76NJIJhJ/Ay84IaD31 ALcatiPrrOfAV8QCrLSdK2Okx6UyISW4aFEWKuAUefqe9LKqmWuZNdsVl6s1lYYooBbO f0vQphBwyKf/tH/cjp9ycyrzEe68hwgolwlt1dBSAxUpYXKBYCaH4lS1ajGGcdhSL6OA +rQw== X-Gm-Message-State: AGi0PuaISsr7PI74dwmMp6O4P0M0Ptl1LxdIPPJ2/vyzxQDQj1ibOG8/ JNzoSYy5ys6W4ij56jg9udH8CWAQ X-Google-Smtp-Source: APiQypK1tqUSKtKVbXs5h2TGUpfYmNP6xbWtF6+hdIHaeoJOlTMmJ92pRqeaG/wmPhwx3ijZK7Q06w== X-Received: by 2002:a05:651c:1038:: with SMTP id w24mr4534655ljm.77.1586805034089; Mon, 13 Apr 2020 12:10:34 -0700 (PDT) Received: from [192.168.1.100] (ip-89-161-13-171.tel.tkb.net.pl. [89.161.13.171]) by smtp.gmail.com with ESMTPSA id p23sm8586312lfc.95.2020.04.13.12.10.32 for <36357@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2020 12:10:33 -0700 (PDT) To: 36357@debbugs.gnu.org References: Subject: bug#36357: Wrong Ghostscript program name on MS Win In-Reply-To: <90d6e546-8058-1cb3-1d2c-da31f9af0edc@gmail.com> From: Sebastian Urban Message-ID: <4291e1bb-c061-39bc-818a-7243544ec52b@gmail.com> Date: Mon, 13 Apr 2020 21:10:32 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: 36357 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) Alright, 25 days have passed, and decision (preferably deed) for this simple bug should be made. Meanwhile I read initial e-mail for this bug and I found a quote: > Or as S. Monnier wrote: "(...) the default could simply > (executable-find "gs") and (executable-find "gswin32c") and use > whichever was found (...)". Could this "executable-find" help in this case? If not, and the condition based on "system-configration" will cause more problems than it'll solve, then a simple change to "gswin64c" should still be better option than leaving "gswin32c". S. U. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 20 16:58:27 2020 Received: (at 36357) by debbugs.gnu.org; 20 Apr 2020 20:58:27 +0000 Received: from localhost ([127.0.0.1]:48500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQdUo-00029G-Vs for submit@debbugs.gnu.org; Mon, 20 Apr 2020 16:58:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQdUn-000293-1V for 36357@debbugs.gnu.org; Mon, 20 Apr 2020 16:58:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55833) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQdUh-0002BH-MW; Mon, 20 Apr 2020 16:58:19 -0400 Received: from pd9fb7802.dip0.t-ipconnect.de ([217.251.120.2]:55648 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jQdUg-0007sZ-Nq; Mon, 20 Apr 2020 16:58:19 -0400 From: Arash Esbati To: Sebastian Urban Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win References: <90d6e546-8058-1cb3-1d2c-da31f9af0edc@gmail.com> <4291e1bb-c061-39bc-818a-7243544ec52b@gmail.com> Date: Mon, 20 Apr 2020 22:57:40 +0200 In-Reply-To: <4291e1bb-c061-39bc-818a-7243544ec52b@gmail.com> (Sebastian Urban's message of "Mon, 13 Apr 2020 21:10:32 +0200") Message-ID: <86y2qpj2nv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Sebastian Urban writes: > Alright, 25 days have passed, and decision (preferably deed) for this > simple bug should be made. > > Meanwhile I read initial e-mail for this bug and I found a quote: >> Or as S. Monnier wrote: "(...) the default could simply >> (executable-find "gs") and (executable-find "gswin32c") and use >> whichever was found (...)". > Could this "executable-find" help in this case? > > If not, and the condition based on "system-configration" will cause > more problems than it'll solve, then a simple change to "gswin64c" > should still be better option than leaving "gswin32c". I don't use doc-view, so I can't really tell, but preview.el (part of AUCTeX) uses "executable-find". Applied to `doc-view-ghostscript-program', it could look like this: --8<---------------cut here---------------start------------->8--- (defcustom doc-view-ghostscript-program (or ;; The GS wrapper coming with TeX Live (file-name-base (executable-find "rungs")) ;; 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 ;; N.B.: Link doesn't work no more! (when (and gs (= 0 (shell-command (concat (shell-quote-argument gs) " -q -dNODISPLAY -c quit")))) (file-name-base gs))) ;; Windows Ghostscript (file-name-base (executable-find "gswin64c.exe")) (file-name-base (executable-find "gswin32c.exe")) ;; standard Ghostscript "gs") "Program to convert PS and PDF files to PNG." :type 'file :version "28.1") --8<---------------cut here---------------end--------------->8--- Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 09:17:17 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 13:17:17 +0000 Received: from localhost ([127.0.0.1]:49163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQsm4-0001OM-SE for submit@debbugs.gnu.org; Tue, 21 Apr 2020 09:17:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQsly-0001O6-Vm for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 09:17:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40884) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQslt-0004zn-EL; Tue, 21 Apr 2020 09:17:05 -0400 Received: from pd9fb74b0.dip0.t-ipconnect.de ([217.251.116.176]:56064 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jQslp-0003jc-QF; Tue, 21 Apr 2020 09:17:02 -0400 From: Arash Esbati To: Sebastian Urban , Tassilo Horn Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win References: <90d6e546-8058-1cb3-1d2c-da31f9af0edc@gmail.com> <4291e1bb-c061-39bc-818a-7243544ec52b@gmail.com> <86y2qpj2nv.fsf@gnu.org> Date: Tue, 21 Apr 2020 15:16:30 +0200 In-Reply-To: <86y2qpj2nv.fsf@gnu.org> (Arash Esbati's message of "Mon, 20 Apr 2020 22:57:40 +0200") Message-ID: <86d0817zdd.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Arash Esbati writes: > I don't use doc-view, so I can't really tell, but preview.el (part of > AUCTeX) uses "executable-find". Applied to > `doc-view-ghostscript-program', it could look like this: Following up myself, I suggest the patch attached. @Tassilo: What do you think, does it make sense? Best, Arash --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Improve-detection-of-Ghostscript-executable.patch >From 2b7bdf2b905271d1fd7c4d4af8a305ff40a50f05 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Tue, 21 Apr 2020 15:01:08 +0200 Subject: [PATCH] Improve detection of Ghostscript executable * lisp/doc-view.el (doc-view-ghostscript-program): Add better support for detection of Ghostscript executable on non-free systems. (bug#36357) --- lisp/doc-view.el | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 8b3d5527f0..eddcd884dd 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -154,13 +154,29 @@ doc-view (defcustom doc-view-ghostscript-program (cond - ((memq system-type '(windows-nt ms-dos)) + ;; The GS wrapper coming with TeX Live + ((executable-find "rungs.exe") + "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 + ((and (executable-find "mgs.exe") + (= 0 (shell-command + (concat (shell-quote-argument (executable-find "mgs.exe")) + " -q -dNODISPLAY -c quit")))) + "mgs") + ;; Windows Ghostscript + ((executable-find "gswin64c.exe") + "gswin64c") + ((executable-find "gswin32c.exe") "gswin32c") + ;; Standard Ghostscript (t "gs")) "Program to convert PS and PDF files to PNG." :type 'file - :version "27.1") + :version "28.1") (defcustom doc-view-pdfdraw-program (cond -- 2.26.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 09:20:25 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 13:20:26 +0000 Received: from localhost ([127.0.0.1]:49171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQsp7-0001UH-KH for submit@debbugs.gnu.org; Tue, 21 Apr 2020 09:20:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQsp6-0001U3-M7 for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 09:20:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40918) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQsp0-0008Og-DJ; Tue, 21 Apr 2020 09:20:18 -0400 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:34823) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jQsox-00040k-LK; Tue, 21 Apr 2020 09:20:16 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 484C027C0058; Tue, 21 Apr 2020 09:20:15 -0400 (EDT) Received: from imap35 ([10.202.2.85]) by compute7.internal (MEProxy); Tue, 21 Apr 2020 09:20:15 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeehgdeiudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfvrghs shhilhhoucfjohhrnhdfuceothhsughhsehgnhhurdhorhhgqeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgr uhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhh eppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id A690814C009C; Tue, 21 Apr 2020 09:20:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1152-g08c8976-fmstable-20200420v1 Mime-Version: 1.0 Message-Id: <3f0dcce2-8837-4ef9-8981-3aa5864ca15f@beta.fastmail.com> In-Reply-To: <86d0817zdd.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> Date: Tue, 21 Apr 2020 15:19:54 +0200 From: "Tassilo Horn" To: "Arash Esbati" , "Sebastian Urban" Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Arash, looks right to me. Can you commit for yourself or should I do it for you= ? Bye, Tassilo Am Di, 21. Apr 2020, um 15:16, schrieb Arash Esbati: > Arash Esbati writes: >=20 > > I don't use doc-view, so I can't really tell, but preview.el (part o= f > > AUCTeX) uses "executable-find". Applied to > > `doc-view-ghostscript-program', it could look like this: >=20 > Following up myself, I suggest the patch attached. >=20 > @Tassilo: What do you think, does it make sense? >=20 > Best, Arash >=20 >=20 > Dateianh=C3=A4nge: > * 0001-Improve-detection-of-Ghostscript-executable.patch From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 09:25:51 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 13:25:51 +0000 Received: from localhost ([127.0.0.1]:49210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQsuM-0001dO-Kl for submit@debbugs.gnu.org; Tue, 21 Apr 2020 09:25:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQsuK-0001dA-Vy for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 09:25:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41031) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQsuF-0007Nn-JT; Tue, 21 Apr 2020 09:25:43 -0400 Received: from pd9fb74b0.dip0.t-ipconnect.de ([217.251.116.176]:56118 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jQsuB-0004Tk-Hu; Tue, 21 Apr 2020 09:25:40 -0400 From: Arash Esbati To: "Tassilo Horn" Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> Date: Tue, 21 Apr 2020 15:25:25 +0200 In-Reply-To: <3f0dcce2-8837-4ef9-8981-3aa5864ca15f@beta.fastmail.com> (Tassilo Horn's message of "Tue, 21 Apr 2020 15:19:54 +0200") Message-ID: <868sip7yyi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: Sebastian Urban , 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Tassilo, "Tassilo Horn" writes: > looks right to me. Can you commit for yourself or should I do it for > you? Thanks for your response. Please commit since I don't have access to Emacs repo. I can only offer to close this bug after your commit :-) Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 13:51:57 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 17:51:57 +0000 Received: from localhost ([127.0.0.1]:50706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQx3t-0008TU-5o for submit@debbugs.gnu.org; Tue, 21 Apr 2020 13:51:57 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:46675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQx3r-0008TF-HG for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 13:51:56 -0400 Received: by mail-wr1-f45.google.com with SMTP id f13so17421165wrm.13 for <36357@debbugs.gnu.org>; Tue, 21 Apr 2020 10:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8Hzme+x77UGgSImOLddosM6ImV9l0pHXlwnhKODMb84=; b=NErdZpFRbpeUy9UJ0jM94hFp0hh0+NLqpVJ3TDTfn4Zji8aUWoQlxe7httd0gecsMm 30sUrpvNrb26ak2CSVULan+sloWJ4dI8SD1iC8c2WqRv0aMgtalBVCza/74W3DaR3FNx Sj0uTr7hR2IAbfmXx7hZBIqOE0FDFlQC2LIXeAabjxLOdBj7CVQQM6/Vl71oq7zP+G9f rmyJrXUbwEXnZ9245saRYbjh4et+IMdkdpDgt8zmS3+FrFryMCbhrcNKMLAsEjjYxuE4 0Cp8GINNhaj5EiuBkYx0OersJTj99aYNAdqEZj7wlfSFaYOQtzojf0SBHM2uwKG2+Ysv K69w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8Hzme+x77UGgSImOLddosM6ImV9l0pHXlwnhKODMb84=; b=BGY+6v6aW6xIjxtC9fdVlckcgr8eplPM3ime/i+uK2V4ATMF6HEgire5kGemUyKtfo ETVsyjbWY2kSbdvdbnPnckTuJ6GLAKBy2VF8FMG6f85d7gooc2i99QlO1ak0uMNhORcN 48B73Ap1yypCA356RGyOGpfRHBCILrYeqAgli2sA55kgPH24XIw94sqGrtic8MnWtesG aX1y3SLrRqQbVN+LRFO3ZwyPHHiEbfMP9HyeA3J6s0XloBxv2MfsMHQCD6ccT5tgNKrg 4xVFUw24CKe1Q4p6Tv0waWH5+GbQRo8B650dY0nr45coQglZdsXzpxW/aGL+fZJgq6qq 4xuw== X-Gm-Message-State: AGi0PuaZyF+7I0D4qN5EnXqythDwW/1Gwe3CKEHBTzsuMFqogRLNuMr4 3FuFQXFpgmq2x5FaBOnJwy/Bwjk6 X-Google-Smtp-Source: APiQypILjGtJr/+nOdvyrWcIaqhBTi7WWstz27CTDJQLbiml0e+1obUdLwcWCWVDjgm2VqYgxdNXTQ== X-Received: by 2002:adf:fc4f:: with SMTP id e15mr25316409wrs.415.1587491509072; Tue, 21 Apr 2020 10:51:49 -0700 (PDT) Received: from ?IPv6:2a00:f41:1cf4:16d5:341b:25b4:977f:92a8? ([2a00:f41:1cf4:16d5:341b:25b4:977f:92a8]) by smtp.gmail.com with ESMTPSA id k9sm4625384wrd.17.2020.04.21.10.51.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Apr 2020 10:51:48 -0700 (PDT) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win To: Arash Esbati , Tassilo Horn 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> From: Sebastian Urban Message-ID: Date: Tue, 21 Apr 2020 19:51:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <868sip7yyi.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks Arash for also looking into it, but part of the patch seems to be unnecessary. I'm writing about these lines: # ;; The GS wrapper coming with TeX Live # ((executable-find "rungs.exe") # "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 # ((and (executable-find "mgs.exe") # (= 0 (shell-command # (concat (shell-quote-argument (executable-find "mgs.exe")) # " -q -dNODISPLAY -c quit")))) # "mgs") They probably belong to AUCTeX only and do nothing in Doc-view. So they should be removed. I also looked into doc-view.el and right under this variable I found "defcustom doc-view-pdfdraw-program", which looks exactly like something we are (may be?) looking for. 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") PS If it's alright could it be installed in 27.1? It's not that big of a change. S. U. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 14:34:55 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 18:34:55 +0000 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 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 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 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 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) 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: 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) From: Tassilo Horn To: Sebastian Urban Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> Date: Tue, 21 Apr 2020 20:34:41 +0200 In-Reply-To: (Sebastian Urban's message of "Tue, 21 Apr 2020 19:51:45 +0200") Message-ID: <87lfmowuv2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: Arash Esbati , Eli Zaretskii , 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 14:48:56 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 18:48:56 +0000 Received: from localhost ([127.0.0.1]:50729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQxx1-0001Vr-8w for submit@debbugs.gnu.org; Tue, 21 Apr 2020 14:48:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQxwy-0001Vc-RO for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 14:48:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46524) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQxwt-0001fi-8i; Tue, 21 Apr 2020 14:48:47 -0400 Received: from [176.228.60.248] (port=2991 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jQxwn-0000Kk-2e; Tue, 21 Apr 2020 14:48:42 -0400 Date: Tue, 21 Apr 2020 21:48:20 +0300 Message-Id: <83d080fzez.fsf@gnu.org> From: Eli Zaretskii To: Tassilo Horn In-Reply-To: <87lfmowuv2.fsf@gnu.org> (message from Tassilo Horn on Tue, 21 Apr 2020 20:34:41 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <87lfmowuv2.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: mrsebastianurban@gmail.com, arash@gnu.org, 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Tassilo Horn > Cc: Arash Esbati , 36357@debbugs.gnu.org, Eli Zaretskii > > Date: Tue, 21 Apr 2020 20:34:41 +0200 > > > 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). I don't really understand how changing a defcustom's value can be urgent, but go for it. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 16:30:01 2020 Received: (at 36357) by debbugs.gnu.org; 21 Apr 2020 20:30:01 +0000 Received: from localhost ([127.0.0.1]:50840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQzWr-00042L-1C for submit@debbugs.gnu.org; Tue, 21 Apr 2020 16:30:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQzWp-000428-Mm for 36357@debbugs.gnu.org; Tue, 21 Apr 2020 16:30:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48706) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQzWi-00028E-HQ; Tue, 21 Apr 2020 16:29:52 -0400 Received: from pd9fb74b0.dip0.t-ipconnect.de ([217.251.116.176]:56691 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jQzWa-0006AK-H6; Tue, 21 Apr 2020 16:29:45 -0400 From: Arash Esbati To: Sebastian Urban Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> Date: Tue, 21 Apr 2020 22:29:23 +0200 In-Reply-To: (Sebastian Urban's message of "Tue, 21 Apr 2020 19:51:45 +0200") Message-ID: <86sggwwpjw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org, Tassilo Horn X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Sebastian, Sebastian Urban writes: > Thanks Arash for also looking into it, but part of the patch seems to > be unnecessary. I'm writing about these lines: > > # ;; The GS wrapper coming with TeX Live > # ((executable-find "rungs.exe") > # "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 > # ((and (executable-find "mgs.exe") > # (= 0 (shell-command > # (concat (shell-quote-argument (executable-find "mgs.exe")) > # " -q -dNODISPLAY -c quit")))) > # "mgs") > > They probably belong to AUCTeX only and do nothing in Doc-view. So > they should be removed. I tend not to agree here as I've seen people who only have TeXlive/MikTeX installed on Windows which cater for a minimal Ghostscript. Those people could benefit from the code above. OTOH, I don't have a strong opinion on this, so I'm fine with whatever Tassilo pushes to Emacs repo. Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 05:05:39 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 09:05:39 +0000 Received: from localhost ([127.0.0.1]:51274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRBK6-00068J-Oh for submit@debbugs.gnu.org; Wed, 22 Apr 2020 05:05:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRBK2-00067u-Cv for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 05:05:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55628) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRBJx-0007TO-5y; Wed, 22 Apr 2020 05:05:29 -0400 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:46605) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jRBJv-000790-KH; Wed, 22 Apr 2020 05:05:27 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id F2D4127C0054; Wed, 22 Apr 2020 05:05:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 22 Apr 2020 05:05:26 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeejgddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucffohhmrghinhepmhhikhhtvg igrdhorhhgnecukfhppeekgedrudefvddrleeirddvheegnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuth hhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeep ghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Received: from thinkpad-t440p (p548460fe.dip0.t-ipconnect.de [84.132.96.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 290923065CB4; Wed, 22 Apr 2020 05:05:26 -0400 (EDT) From: Tassilo Horn To: Arash Esbati Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> Date: Wed, 22 Apr 2020 11:05:24 +0200 In-Reply-To: <86sggwwpjw.fsf@gnu.org> (Arash Esbati's message of "Tue, 21 Apr 2020 22:29:23 +0200") Message-ID: <87368vevqj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: Sebastian Urban , 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Arash Esbati writes: Hi again, > I tend not to agree here as I've seen people who only have > TeXlive/MikTeX installed on Windows which cater for a minimal > Ghostscript. Those people could benefit from the code above. I think that's a valid argument. So that's what I would go for. --8<---------------cut here---------------start------------->8--- @@ -153,14 +153,27 @@ doc-view :prefix "doc-view-") (defcustom doc-view-ghostscript-program - (cond - ((memq system-type '(windows-nt ms-dos)) - "gswin32c") - (t - "gs")) + (or + ;; Standard Ghostscript + (executable-find "gs") + ;; 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)) + ;; Standard Ghostscript as fallback + "gs") "Program to convert PS and PDF files to PNG." :type 'file - :version "27.1") + :version "28.1") --8<---------------cut here---------------end--------------->8--- We should ask ourselves if the order is ok, i.e., if on systems where multiple gs installs are available, the "best" one gets selected. So is it correct to prefer gswin64c over gswin32c and that over rungs and mgs? Another question: You both used executable-find with exe file extension. Was that intended? I mean, it makes sure we don't falsely set some "gs.bat" or "gs.cmd" which might have nothing to do with GhostScript. Is that a real danger? If so, we need the OS distinction again. Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 06:08:01 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 10:08:01 +0000 Received: from localhost ([127.0.0.1]:51368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRCIT-0007ij-BP for submit@debbugs.gnu.org; Wed, 22 Apr 2020 06:08:01 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRCIS-0007iS-3e for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 06:08:00 -0400 Received: by mail-lf1-f65.google.com with SMTP id f8so1135982lfe.12 for <36357@debbugs.gnu.org>; Wed, 22 Apr 2020 03:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=luv84+gdCaIeX/g3HwHwgP6j/RqYd6g5rHoYoeLlrTM=; b=ch2L0GkP3TOGYRW5fUJMdty0a82EiT+aXH/ksW+RQyuvxVn3b5/sX+OXVGxrvXbIuQ 1ClUIn7G6HUUTFGlhP/PQWI37p1X1LejANUMMkQakzdFqoyaegqsIlJBU5wRFTeqcf1X Q7ExohLZdAwRyIGhHjj56Ek5+Xu505Q7rdk0ghJUM3KUsmrk1uQWhWUZy+8WXrG1xAei 3q0kfc76Qoht6KenR2k/K/3W20bBtpHkKAjljKdVfg7v1cgrt5p5/WctCShKQK1qsWhc O0HqYdZL97bJHlHcQetqZVpzIEWUEAcMAwHA8MKHv7LRLg8o4bqQhHxRqvImyMXo6x87 cxag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=luv84+gdCaIeX/g3HwHwgP6j/RqYd6g5rHoYoeLlrTM=; b=awUp1xFUQkT2LKlORNRralgAMvhC9R3iwGOJpg55cRjmrFZiE4Ah3alK2hmmavwWFs YY0+GuQH2k0LiCsEzV5xU87CkKc7dnXPK4p3R0W9qvMXwmX5+t0Xk6bea99foXI0cr/T L2VXpZE58P+6tzMysje3e7eWxW+G0XZAvlo2EC5AGkdj17L5DxOLiL/mOwnvi3cSPIGO mZczBsTq04sFx9vdzxRN2F+NlvLqahPEKaM/Ml3IsjTrCGb+niuzRaF0lzNyT5Vrk4jI ycxN5ki2iAaEjg3sTpOFtukjwJvec6GfNhQbyuR5fxM1hdiwtvrsaUgA3YaPLBKJXqMU BrCw== X-Gm-Message-State: AGi0PuZ0jV2njWj7YrpZB/+ay8drsQGeQIcXz/wqXPIxDoDuudep9Xjv KcLx6nqJbzWBvqbEnRN+jCP86wzX X-Google-Smtp-Source: APiQypIZ2KeDTQDt8eScMK5bb9XM+6oHUoF+tQhebjgrHUKe62siq+kV0Kc4+DP9BH+WysRRoSV5rw== X-Received: by 2002:a19:4b90:: with SMTP id y138mr16135765lfa.39.1587550073542; Wed, 22 Apr 2020 03:07:53 -0700 (PDT) Received: from [192.168.1.100] (ip-89-161-13-171.tel.tkb.net.pl. [89.161.13.171]) by smtp.gmail.com with ESMTPSA id h14sm4298507lfm.60.2020.04.22.03.07.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Apr 2020 03:07:52 -0700 (PDT) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win To: Tassilo Horn , Arash Esbati 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> From: Sebastian Urban Message-ID: <024c3dc6-b18f-f98d-0ea2-f709c72ff651@gmail.com> Date: Wed, 22 Apr 2020 12:07:54 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87368vevqj.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36357 Cc: 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I tend not to agree here as I've seen people who only have >> TeXlive/MikTeX installed on Windows which cater for a minimal >> Ghostscript. Those people could benefit from the code above. > > I think that's a valid argument. So that's what I would go for. I would say that this is not very "default" (default = normal Ghostscript installation) setup, in which case user should set up desired setting manually. But it's your call, I won't object here. About the code: 1. There is: + ;; Standard Ghostscript + (executable-find "gs") ... + ;; Standard Ghostscript as fallback + "gs") What for is first "Standard Ghostscript"? There is no "gs" in Windows, and fallback will work for Unix. 2. Version is set to 28.1, so... we are skipping 27.1? It's not big deal for me, but some say: don't put off until tomorrow (28.1) what you can do today (27.1). > We should ask ourselves if the order is ok, i.e., if on systems > where multiple gs installs are available, the "best" one gets > selected. So is it correct to prefer gswin64c over gswin32c and > that over rungs and mgs? I think it's OK, because "gswin32/64c" is, as I mentioned earlier - the default way of setting up GS, and it should have higher priority as default, as well as 64bits should be higher than 32bits version, because... well, everything moves towards 64bits, so it is more up-to-date order. As for "rungs/mgs" - what is more common "TeX Live/MikTeX"? > Another question: You both used executable-find with exe file > extension. Was that intended? I mean, it makes sure we don't > falsely set some "gs.bat" or "gs.cmd" which might have nothing to do > with GhostScript. Is that a real danger? "Falsely setting" file with the same name but different extension crossed my mind. So, yes we should include extension just to be sure, that function will find exactly what we are looking for. > If so, we need the OS distinction again. What for? S. U. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 09:01:12 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 13:01:12 +0000 Received: from localhost ([127.0.0.1]:51515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRF03-00089I-QB for submit@debbugs.gnu.org; Wed, 22 Apr 2020 09:01:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRF02-000894-DA for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 09:01:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58193) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jREzx-0000o5-1v; Wed, 22 Apr 2020 09:01:05 -0400 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:42995) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jREzr-0003LS-10; Wed, 22 Apr 2020 09:00:59 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 94B8927C0054; Wed, 22 Apr 2020 09:00:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 22 Apr 2020 09:00:58 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeejgdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucffohhmrghinhepmhhikhhtvg igrdhorhhgnecukfhppeekgedrudefvddrleeirddvheegnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuth hhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeep ghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Received: from thinkpad-t440p (p548460fe.dip0.t-ipconnect.de [84.132.96.254]) by mail.messagingengine.com (Postfix) with ESMTPA id BA4DC3065CD8; Wed, 22 Apr 2020 09:00:57 -0400 (EDT) From: Tassilo Horn To: Sebastian Urban Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> <024c3dc6-b18f-f98d-0ea2-f709c72ff651@gmail.com> Date: Wed, 22 Apr 2020 15:00:55 +0200 In-Reply-To: <024c3dc6-b18f-f98d-0ea2-f709c72ff651@gmail.com> (Sebastian Urban's message of "Wed, 22 Apr 2020 12:07:54 +0200") Message-ID: <87k127y8s8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: Arash Esbati , 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Sebastian Urban writes: >>> I tend not to agree here as I've seen people who only have >>> TeXlive/MikTeX installed on Windows which cater for a minimal >>> Ghostscript. Those people could benefit from the code above. >> >> I think that's a valid argument. So that's what I would go for. > > I would say that this is not very "default" (default = normal > Ghostscript installation) setup, in which case user should set up > desired setting manually. Well, if there is no harm in doing so, I don't see a reason not to support those non-default setups automatically. And in my opinion, having a TeX distro and no manual ghostscript install seems not so uncommon. > About the code: > > 1. There is: > + ;; Standard Ghostscript > + (executable-find "gs") > ... > + ;; Standard Ghostscript as fallback > + "gs") > > What for is first "Standard Ghostscript"? There is no "gs" in > Windows, and fallback will work for Unix. The reason is that I wanted to prefer gs over rungs in case both are installed (like on my GNU/Linux box). > 2. Version is set to 28.1, so... we are skipping 27.1? It's not big > deal for me, but some say: don't put off until tomorrow (28.1) what > you can do today (27.1). Yes, that was wrong and a left-over of Arash's patch where he assumed the change would go only into master instead of emacs-27. >> We should ask ourselves if the order is ok, i.e., if on systems where >> multiple gs installs are available, the "best" one gets selected. So >> is it correct to prefer gswin64c over gswin32c and that over rungs >> and mgs? > > I think it's OK, because "gswin32/64c" is, as I mentioned earlier - > the default way of setting up GS, and it should have higher priority > as default, as well as 64bits should be higher than 32bits version, > because... well, everything moves towards 64bits, so it is more > up-to-date order. As for "rungs/mgs" - what is more common "TeX > Live/MikTeX"? I think, this doesn't matter. Nobody has both TeXLive and MikTeX installed in parallel. >> Another question: You both used executable-find with exe file >> extension. Was that intended? I mean, it makes sure we don't >> falsely set some "gs.bat" or "gs.cmd" which might have nothing to do >> with GhostScript. Is that a real danger? > > "Falsely setting" file with the same name but different extension > crossed my mind. So, yes we should include extension just to be sure, > that function will find exactly what we are looking for. Ok. >> If so, we need the OS distinction again. > > What for? Because I've thought it would be nice to test for (executable-find "rungs") on any platform but (executable-find "rungs.exe") will of course work only on Windows. On the other hand, rungs on non-windows platforms just calls gs anyway, so we can skip that there. So if nobody complains, I'll commit the version below later. --8<---------------cut here---------------start------------->8--- @@ -155,9 +155,21 @@ doc-view (defcustom doc-view-ghostscript-program (cond ((memq system-type '(windows-nt ms-dos)) - "gswin32c") - (t - "gs")) + (or + ;; Windows Ghostscript + (executable-find "gswin64c.exe") + (executable-find "gswin32c.exe") + ;; The GS wrapper coming with TeX Live + (executable-find "rungs.exe") + ;; 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.exe"))) + (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") --8<---------------cut here---------------end--------------->8--- Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 09:46:05 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 13:46:05 +0000 Received: from localhost ([127.0.0.1]:51634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRFhU-00060f-NC for submit@debbugs.gnu.org; Wed, 22 Apr 2020 09:46:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRFhS-0005su-3j for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 09:46:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58751) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFhM-0007NI-Po; Wed, 22 Apr 2020 09:45:56 -0400 Received: from [176.228.60.248] (port=4554 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jRFhI-0003Qw-SC; Wed, 22 Apr 2020 09:45:53 -0400 Date: Wed, 22 Apr 2020 16:45:35 +0300 Message-Id: <831roffxc0.fsf@gnu.org> From: Eli Zaretskii To: Tassilo Horn In-Reply-To: <87368vevqj.fsf@gnu.org> (message from Tassilo Horn on Wed, 22 Apr 2020 11:05:24 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: arash@gnu.org, mrsebastianurban@gmail.com, 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Tassilo Horn > Date: Wed, 22 Apr 2020 11:05:24 +0200 > Cc: Sebastian Urban , 36357@debbugs.gnu.org > > Another question: You both used executable-find with exe file extension. > Was that intended? I mean, it makes sure we don't falsely set some > "gs.bat" or "gs.cmd" which might have nothing to do with GhostScript. > Is that a real danger? If so, we need the OS distinction again. It is IME wrong and user-unfriendly to refuse to load foo.bat or foo.cmd and insist on running foo.exe. The reason is that having a batch file that shadows a .exe program is the easiest way of "customizing" programs, like adding default arguments, setting up a special PATH value, etc. I need to do that quite a lot, especially when working in fascist domains where the admins think they know better what I need and what I don't. So I wouldn't like it if Emacs, of all programs, would disallow me to have a gs64winc.cmd file when the .exe somehow needs some help to run correctly. Therefore, my suggestion is to use just "foo" without any extension. If the user has a foo.bat that is found before foo.exe, it is their misconfiguration, and they need to fix that locally. However, more often than not, the user _wants_ the batch file to run instead, and we shouldn't punish users who know what they are doing on behalf of those who don't. Just my $0.02, feel free to disregard. P.S. This is not Windows-specific, IMO: the same is true on Posix systems where a shell script can "shadow" a program. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 09:51:17 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 13:51:18 +0000 Received: from localhost ([127.0.0.1]:51655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRFmX-0007Bx-LJ for submit@debbugs.gnu.org; Wed, 22 Apr 2020 09:51:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRFmW-0007Bk-TS for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 09:51:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58882) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFmR-0000CI-J7; Wed, 22 Apr 2020 09:51:11 -0400 Received: from [176.228.60.248] (port=4864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jRFmL-0003wI-AI; Wed, 22 Apr 2020 09:51:06 -0400 Date: Wed, 22 Apr 2020 16:50:42 +0300 Message-Id: <83y2qneij1.fsf@gnu.org> From: Eli Zaretskii To: Sebastian Urban In-Reply-To: <024c3dc6-b18f-f98d-0ea2-f709c72ff651@gmail.com> (message from Sebastian Urban on Wed, 22 Apr 2020 12:07:54 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> <024c3dc6-b18f-f98d-0ea2-f709c72ff651@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: arash@gnu.org, 36357@debbugs.gnu.org, tsdh@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Sebastian Urban > Date: Wed, 22 Apr 2020 12:07:54 +0200 > Cc: 36357@debbugs.gnu.org > > > Another question: You both used executable-find with exe file > > extension. Was that intended? I mean, it makes sure we don't > > falsely set some "gs.bat" or "gs.cmd" which might have nothing to do > > with GhostScript. Is that a real danger? > > "Falsely setting" file with the same name but different extension > crossed my mind. So, yes we should include extension just to be sure, > that function will find exactly what we are looking for. We don't know what we are looking for; only the end user does. Even Windows allows to rename executable files, so there's nothing magic in the name gswin64c.exe, the actual program can be called anything and can have any valid executable extension. Please leave the user the freedom of starting Ghostscript via a batch file, if they so wish. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 10:15:07 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 14:15:07 +0000 Received: from localhost ([127.0.0.1]:52813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRG9X-0008A9-SQ for submit@debbugs.gnu.org; Wed, 22 Apr 2020 10:15:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRG9V-00089I-Lg for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 10:15:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59213) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRG9Q-000534-Da; Wed, 22 Apr 2020 10:14:56 -0400 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:42893) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jRG9O-0001he-LI; Wed, 22 Apr 2020 10:14:54 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id EAA1A27C0054; Wed, 22 Apr 2020 10:14:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 22 Apr 2020 10:14:53 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeejgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucfkphepkeegrddufedvrdelie drvdehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekje ekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from thinkpad-t440p (p548460fe.dip0.t-ipconnect.de [84.132.96.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 938943280064; Wed, 22 Apr 2020 10:14:49 -0400 (EDT) From: Tassilo Horn To: Eli Zaretskii Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> <831roffxc0.fsf@gnu.org> Date: Wed, 22 Apr 2020 16:14:41 +0200 In-Reply-To: <831roffxc0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 Apr 2020 16:45:35 +0300") Message-ID: <87v9lrsj3i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: arash@gnu.org, mrsebastianurban@gmail.com, 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: >> Another question: You both used executable-find with exe file >> extension. Was that intended? I mean, it makes sure we don't >> falsely set some "gs.bat" or "gs.cmd" which might have nothing to do >> with GhostScript. Is that a real danger? If so, we need the OS >> distinction again. > > It is IME wrong and user-unfriendly to refuse to load foo.bat or > foo.cmd and insist on running foo.exe. The reason is that having a > batch file that shadows a .exe program is the easiest way of > "customizing" programs, like adding default arguments, setting up a > special PATH value, etc. I agree, and I will omit the extension at least for gs{64,32}winc. The question is more how likely it is that some user has her own "rungs" command/batch script which has nothing to do with "running GhostScript" and then we call it in doc-view. I mean, "rungs" is at least an English word... > P.S. This is not Windows-specific, IMO: the same is true on Posix > systems where a shell script can "shadow" a program. Sure, but I guess that users on POSIX systems take a bit more care in naming their scripts, i.e., if their ~/bin/foo shadows /usr/bin/foo that's most probably wanted for the very reasons you described. On Windows, where most programs install everything they need in their own installation directory instead of assuming the dependencies were installed individually (by a package manager), such a habit of PATH hygiene (unambiguous naming xor shadowing on purpose) might not be so common. Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 10:33:05 2020 Received: (at 36357) by debbugs.gnu.org; 22 Apr 2020 14:33:06 +0000 Received: from localhost ([127.0.0.1]:52829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRGQz-0000DN-LL for submit@debbugs.gnu.org; Wed, 22 Apr 2020 10:33:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRGQy-0000Ct-NZ for 36357@debbugs.gnu.org; Wed, 22 Apr 2020 10:33:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59474) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRGQt-0004Ze-Bm; Wed, 22 Apr 2020 10:32:59 -0400 Received: from [176.228.60.248] (port=3425 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jRGQn-0004WX-7O; Wed, 22 Apr 2020 10:32:53 -0400 Date: Wed, 22 Apr 2020 17:32:34 +0300 Message-Id: <83sggvegl9.fsf@gnu.org> From: Eli Zaretskii To: Tassilo Horn In-Reply-To: <87v9lrsj3i.fsf@gnu.org> (message from Tassilo Horn on Wed, 22 Apr 2020 16:14:41 +0200) Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> <831roffxc0.fsf@gnu.org> <87v9lrsj3i.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357 Cc: arash@gnu.org, mrsebastianurban@gmail.com, 36357@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Tassilo Horn > Cc: arash@gnu.org, mrsebastianurban@gmail.com, 36357@debbugs.gnu.org > Date: Wed, 22 Apr 2020 16:14:41 +0200 > > > It is IME wrong and user-unfriendly to refuse to load foo.bat or > > foo.cmd and insist on running foo.exe. The reason is that having a > > batch file that shadows a .exe program is the easiest way of > > "customizing" programs, like adding default arguments, setting up a > > special PATH value, etc. > > I agree, and I will omit the extension at least for gs{64,32}winc. The > question is more how likely it is that some user has her own "rungs" > command/batch script which has nothing to do with "running GhostScript" > and then we call it in doc-view. I mean, "rungs" is at least an English > word... I think it's unlikely. E.g., on my system there's not a single file that goes by the name "rungs" with any extension. Another data point is that package authors generally try to choose names for their programs that don't clash with existing popular programs. So I think you could stop worrying about this. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 13:29:43 2020 Received: (at 36357-done) by debbugs.gnu.org; 22 Apr 2020 17:29:43 +0000 Received: from localhost ([127.0.0.1]:53123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRJBv-0000lk-HF for submit@debbugs.gnu.org; Wed, 22 Apr 2020 13:29:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRJBt-0000lY-5o for 36357-done@debbugs.gnu.org; Wed, 22 Apr 2020 13:29:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33921) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRJBn-0002xz-Tt; Wed, 22 Apr 2020 13:29:35 -0400 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:40373) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jRJBk-0001ur-J6; Wed, 22 Apr 2020 13:29:34 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 55D0027C0054; Wed, 22 Apr 2020 13:29:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 22 Apr 2020 13:29:32 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeejgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuffhomhgrihhnpehmihhkth gvgidrohhrghenucfkphepkeegrddufedvrdeliedrvdehgeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruh hthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhhep pehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from thinkpad-t440p (p548460fe.dip0.t-ipconnect.de [84.132.96.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 71EFD328006B; Wed, 22 Apr 2020 13:29:31 -0400 (EDT) From: Tassilo Horn To: Eli Zaretskii Subject: Re: bug#36357: Wrong Ghostscript program name on MS Win 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> <86sggwwpjw.fsf@gnu.org> <87368vevqj.fsf@gnu.org> <831roffxc0.fsf@gnu.org> <87v9lrsj3i.fsf@gnu.org> <83sggvegl9.fsf@gnu.org> Date: Wed, 22 Apr 2020 19:29:30 +0200 In-Reply-To: <83sggvegl9.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 Apr 2020 17:32:34 +0300") Message-ID: <87a733sa2t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36357-done Cc: arash@gnu.org, mrsebastianurban@gmail.com, 36357-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: >> From: Tassilo Horn >> Cc: arash@gnu.org, mrsebastianurban@gmail.com, 36357@debbugs.gnu.org >> Date: Wed, 22 Apr 2020 16:14:41 +0200 >> >> > It is IME wrong and user-unfriendly to refuse to load foo.bat or >> > foo.cmd and insist on running foo.exe. The reason is that having a >> > batch file that shadows a .exe program is the easiest way of >> > "customizing" programs, like adding default arguments, setting up a >> > special PATH value, etc. >> >> I agree, and I will omit the extension at least for gs{64,32}winc. The >> question is more how likely it is that some user has her own "rungs" >> command/batch script which has nothing to do with "running GhostScript" >> and then we call it in doc-view. I mean, "rungs" is at least an English >> word... > > I think it's unlikely. E.g., on my system there's not a single file > that goes by the name "rungs" with any extension. Another data point > is that package authors generally try to choose names for their > programs that don't clash with existing popular programs. So I think > you could stop worrying about this. Ok, thank you all, that's the patch I've eventually pushed to emacs-27. --8<---------------cut here---------------start------------->8--- @@ -155,9 +155,21 @@ doc-view (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") --8<---------------cut here---------------end--------------->8--- Eli, I guess some brave soul merges from emacs-27 to master from time to time, so there's nothing more I have to do, right? Bye, Tassilo From unknown Fri Jun 20 07:18:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 May 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator