From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#24042: mudraw doesn't exist any more Date: Wed, 20 Jul 2016 17:24:17 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1469049811 30166 80.91.229.3 (20 Jul 2016 21:23:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2016 21:23:31 +0000 (UTC) Cc: Tassilo Horn To: 24042@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 20 23:23:18 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 1bPyxZ-0002ey-K6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 23:23:17 +0200 Original-Received: from localhost ([::1]:37159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPyxV-00024v-0H for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 17:23:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPyxO-00024o-R3 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 17:23:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPyxK-0005B8-NJ for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 17:23:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPyxK-0005B4-JW; Wed, 20 Jul 2016 17:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bPyxK-0007vH-D7; Wed, 20 Jul 2016 17:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: tsdh@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jul 2016 21:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24042 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Tassilo Horn Original-Received: via spool by submit@debbugs.gnu.org id=B.146904974030388 (code B ref -1); Wed, 20 Jul 2016 21:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2016 21:22:20 +0000 Original-Received: from localhost ([127.0.0.1]:59039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPywe-0007u4-Cu for submit@debbugs.gnu.org; Wed, 20 Jul 2016 17:22:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPywc-0007ts-R6 for submit@debbugs.gnu.org; Wed, 20 Jul 2016 17:22:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPywU-00050j-La for submit@debbugs.gnu.org; Wed, 20 Jul 2016 17:22:13 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPywU-00050S-IW for submit@debbugs.gnu.org; Wed, 20 Jul 2016 17:22:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPywS-00021n-Ad for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 17:22:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPywL-0004yv-Nl for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 17:22:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPywL-0004yq-K5 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 17:22:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CDEAA731xV/3mcpUVcgxABhAGyUwGOQYFLgzOCTQSBQDsSAQEBAQEBAYEKQQWECi9fEyEBHA0YiEubL7Qgj1uBAYQXBYtEp3uBRSOBR4JNIoJ4AQEB X-IPAS-Result: A0CDEAA731xV/3mcpUVcgxABhAGyUwGOQYFLgzOCTQSBQDsSAQEBAQEBAYEKQQWECi9fEyEBHA0YiEubL7Qgj1uBAYQXBYtEp3uBRSOBR4JNIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="248702716" Original-Received: from 69-165-156-121.dsl.teksavvy.com (HELO ceviche.home) ([69.165.156.121]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Jul 2016 17:22:00 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1A9CC661DE; Wed, 20 Jul 2016 17:24:17 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:121339 Archived-At: Package: Emacs Version: 25.1.50 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. Stefan diff --git a/lisp/doc-view.el b/lisp/doc-view.el index e16d453..d16b2f5 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -164,6 +164,8 @@ 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 @@ -1028,7 +1030,10 @@ 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) + ;; FIXME: Ugly hack: recent mupdf distribution replaced "mudraw" with + ;; "mutool draw". + `(,@(if (string-match "mutool[^/\\]*$" doc-view-pdfdraw-program) '("draw")) + ,(concat "-o" png) ,(format "-r%d" (round doc-view-resolution)) ,pdf ,@(if page `(,(format "%d" page))))