From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#24042: mudraw doesn't exist any more Date: Wed, 20 Jul 2016 23:46:56 -0400 Message-ID: <728b2103-88d6-ae1d-ca06-c8fb4ce72d38@gmail.com> References: <87vazz9b11.fsf@petton.fr> <87zipb3hdb.fsf@udel.edu> <87shv3ycu2.fsf@udel.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="A4fsH0XgWrHXLvjUfCMq2LnMoc6KLOvfc" X-Trace: ger.gmane.org 1469072906 30925 80.91.229.3 (21 Jul 2016 03:48:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2016 03:48:26 +0000 (UTC) To: 24042@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 21 05:48:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bQ4y6-0005pA-6q for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jul 2016 05:48:14 +0200 Original-Received: from localhost ([::1]:38071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ4y5-0005L8-7F for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 23:48:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ4xy-0005Ks-R9 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ4xu-0002Jv-KE for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:48:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ4xu-0002Jr-H5 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bQ4xu-0008FL-83 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2016 03:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24042 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146907284531655 (code B ref -1); Thu, 21 Jul 2016 03:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jul 2016 03:47:25 +0000 Original-Received: from localhost ([127.0.0.1]:59161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ4xJ-0008EU-8M for submit@debbugs.gnu.org; Wed, 20 Jul 2016 23:47:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ4xH-0008EH-5U for submit@debbugs.gnu.org; Wed, 20 Jul 2016 23:47:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ4xA-0002Du-RT for submit@debbugs.gnu.org; Wed, 20 Jul 2016 23:47:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ4xA-0002Dp-O9 for submit@debbugs.gnu.org; Wed, 20 Jul 2016 23:47:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ4x8-0005Et-B0 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:47:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ4x5-0002DY-5O for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:47:14 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]:54906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ4x4-0002DT-NE for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 23:47:11 -0400 Original-Received: from [172.17.11.203] ([162.223.5.123]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0Ljz90-1atmKt14Qs-00c5tB for ; Thu, 21 Jul 2016 05:47:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <87shv3ycu2.fsf@udel.edu> X-Provags-ID: V03:K0:FHYUr/dZ8yhl/lpGOtAHPO0gnRFIgq6s7+o4HYh8oNZkT6REuty 9KsPHiZIQwi/qYAgxHKIbwOSsjhZUKuwCINLYGsp861IyFxMc8v2yJ0JXjwCEflEOFg5qeA el/QTC7A1AeDyVjq4/1H337W5GFljzUqRR/iPQykox9GmDUgRbPgMRiB5pUl+pYSb6vSar7 i2/n0CTCV/1Z3TDZ+K6/Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:0nV2z7TjxJ4=:lk3X7g9K9bXU1rwgmk5UBt motGgTkDP/tKbimzcxkbnastw9N6pJVjNdSOKWWJ8XWQk26gPDbWMsSVPFUs4E3LEK9zUELVa sJDTjWhdCer8BaU46/KK4lCrlm8uRHa5Xowgl9opHj/AQP3lGkGG59WJZgMdWBDCta6IHEWPD SnVSl7xg6B+O6Z/DvV8RfG8y0Qblf5YV/cLlJB70DlPYY35pMZF7q6d8scADhtNOJp9b94UMt kRmzhldRFyzTwfeGZpAmCDdLzCeRRwGvJvEu3u1vdahW92B/jVHw66jSHy4765eT63o+HAOkK HATGZrhYbTieGrPulg9C/AlTe8vwJMS5+KqYypAcA2rYVTHHTFNNvyvVnUxIzRiMnvsjbhqof q/p2S22QbAC8p3SEhGzbgsAY2DOtMVb/Jo2EDBTzr7jRNAYcCAW1lc3tYTzPLvB7jKiejf3yG Kmwlz6rV5SX9fishO1tFwO63frs/P8yU0XhnFmyT42OnYZRWhnDcSdGO/npqdfpxvJlU5dzJ0 4BlcKlSIPdBOzYcfm89OtqfhTNncmPlfl4IHeZAEySb4QWZT+3luL1ck1ifuGRLkA89Ni0AYf VvCHgcKA1A+mDYZRiV9KUvW5ORiJjWvjZ/T2jCOArtOkk9mUwoadK+ceQ602UT8SFcZGppfPv /Japf21Xd15Ablb6bhZmPKzgXj4sFwjSVG51YtVb1UOWi/SV0H1G/jlwwjliQbQ4H1FI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121358 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --A4fsH0XgWrHXLvjUfCMq2LnMoc6KLOvfc Content-Type: multipart/mixed; boundary="QSETafhJeEeV9MCktNHJX4RlBJEbhrKD7" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: bug-gnu-emacs@gnu.org Message-ID: <728b2103-88d6-ae1d-ca06-c8fb4ce72d38@gmail.com> Subject: Re: bug#24042: mudraw doesn't exist any more References: <87vazz9b11.fsf@petton.fr> <87zipb3hdb.fsf@udel.edu> <87shv3ycu2.fsf@udel.edu> In-Reply-To: <87shv3ycu2.fsf@udel.edu> --QSETafhJeEeV9MCktNHJX4RlBJEbhrKD7 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Alternatively, we could change from a program name to a function that bui= lds a command line string; this would work with viewer/renderers that don= 't accept -o and -r. On 2016-07-20 21:55, Mark Oteiza wrote: > Mark Oteiza writes: >=20 >> Stefan Monnier writes: >> >>>>> Apparently mudraw has been superseded by "mutool draw". I'm using = the >>>>> patch below to accommodate this new situation, but it's not >>>>> quite satisfactory. >>>> Why is it not satisfactory? What choice do we have if `mudraw' has = been >>>> replaced? >>> >>> It's the string-match that's not very satisfactory. If the "mutool" >>> happens to have a name that doesn't match the regexp, or if some othe= r >>> tool (pdfdraw or mudraw) happens to match the regexp things will go w= rong. >> >> There should likely be a doc-view-pdfdraw-options. I remember poking >> net-utils.el recently which has an approach like this. May not solve >> the problem, but at least it is exposed to the user. >=20 > diff --git a/lisp/doc-view.el b/lisp/doc-view.el > index 223565c..e52b078 100644 > --- a/lisp/doc-view.el > +++ b/lisp/doc-view.el > @@ -161,10 +161,20 @@ doc-view-ghostscript-program > (defcustom doc-view-pdfdraw-program > (cond > ((executable-find "pdfdraw") "pdfdraw") > + ((executable-find "mudraw") "mudraw") > + ((executable-find "mutool") "mutool") > (t "mudraw")) > "Name of MuPDF's program to convert PDF files to PNG." > :type 'file > - :version "24.4") > + :version "25.1") > + > +(defcustom doc-view-pdfdraw-options > + (cond > + ((string-match-p "mutool\\'" doc-view-pdfdraw-program) (list "draw"= )) > + (t nil)) > + "A list of options to give to `doc-view-pdfdraw-program'." > + :type '(repeat string) > + :version "25.1") > =20 > (defcustom doc-view-pdf->png-converter-function > (if (executable-find doc-view-pdfdraw-program) > @@ -960,7 +970,8 @@ doc-view-djvu->tiff-converter-ddjvu > (defun doc-view-pdf->png-converter-mupdf (pdf png page callback) > (doc-view-start-process > "pdf->png" doc-view-pdfdraw-program > - `(,(concat "-o" png) > + `(,@doc-view-pdfdraw-options > + ,(concat "-o" png) > ,(format "-r%d" (round doc-view-resolution)) > ,pdf > ,@(if page `(,(format "%d" page)))) >=20 >=20 >=20 >=20 --QSETafhJeEeV9MCktNHJX4RlBJEbhrKD7-- --A4fsH0XgWrHXLvjUfCMq2LnMoc6KLOvfc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXkEWwAAoJEPqg+cTm90wjiYoP/3gN6zOy7PnL547fZPWTFEO5 bfJqIpyKYt8pDopqAbqme5IUTF1y+ozIasfYcp0xXLoivmdiAayCzCYpcNWchBNZ 8y6gLbn3xZXlnkkvxXHAlmD2kCVIctaGJbSZPRpubLUuFB7ifsNoaP1CPVGl7NdE ojK+YtjYil0TGNY1MUtMLRhds2zcKj/JhIfqAgNJynqaUgTGiRcPL/rSN6/dIGbV sAv6AjUn4GEYc3kwfG95dvN+qn+qRIOXBRjJktwVbRn/0ID7xQc/qU+u14R4B9ZL 3F2VpzT2vTx2oWdhLNOhf4eqwPg5DchjanJG/9/l7TjL4ay1vklZ4Z35pslGQccD NdQ4aoDaZ/G/thLM/EzeVzBAmoPF/H+xSjTqw6J90TjAjNcdk5mDFg84cmbn+3aN v4jvUkvaaxPDxD8RqBcytU6dh99xQf/3iJdz+r0LrXNP2+f+T7ToZxzuSyb9xiHR esgo+2g/YOc1KYDXjCgVyNJjho2gyaKixsbp0n6cTFhwpLRjFBdkaZtnNGBH8M6R XEbx7I7WDvBqrbWEHvSnMLi5xzPqC5ZngrsmUBVI2BQVfmLx+msb4dxIa4yxL0wi H/b4Z8fJXxlkik4lvnIb7cWutf7JT204jRqtAHqp2IbTlaSCLs+k2QD7M6RRQ959 qwFTzZrF7wlEMZj3+ysT =7FoP -----END PGP SIGNATURE----- --A4fsH0XgWrHXLvjUfCMq2LnMoc6KLOvfc--