From unknown Wed Jun 18 00:19: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#24042 <24042@debbugs.gnu.org> To: bug#24042 <24042@debbugs.gnu.org> Subject: Status: mudraw doesn't exist any more Reply-To: bug#24042 <24042@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:19:46 +0000 retitle 24042 mudraw doesn't exist any more reassign 24042 emacs submitter 24042 Stefan Monnier severity 24042 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 17:22:20 2016 Received: (at submit) by debbugs.gnu.org; 20 Jul 2016 21:22:20 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 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 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 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 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" 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 Received: by ceviche.home (Postfix, from userid 20848) id 1A9CC661DE; Wed, 20 Jul 2016 17:24:17 -0400 (EDT) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: mudraw doesn't exist any more X-Debbugs-Cc: Tassilo Horn Date: Wed, 20 Jul 2016 17:24:17 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) 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)))) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 18:53:45 2016 Received: (at 24042) by debbugs.gnu.org; 20 Jul 2016 22:53:45 +0000 Received: from localhost ([127.0.0.1]:59077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ0N7-0001ZU-8Z for submit@debbugs.gnu.org; Wed, 20 Jul 2016 18:53:45 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ0N5-0001ZM-OC for 24042@debbugs.gnu.org; Wed, 20 Jul 2016 18:53:44 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7F54520740; Wed, 20 Jul 2016 18:53:43 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 20 Jul 2016 18:53:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=clumGqYKuBeOBZf5FuSVOlAn2tw=; b=An3f5 G6wOAu6tFREKbhNmdRdsrBCOdfIZ/JlTIURBLwx1aAtidNR0cs6b6wHSkxpzvV1e R/OY+Vy/lz3jwgHhRvoLujddGrW74tAiZBJcYzaMJAGPfTW2lmkhcL90Ytde2gHW HHN1RNX4zwxbXbZpqhD2JoMW/nHIVQh96Zlndo= X-Sasl-enc: Wgje1QzShWSmzHo73EnymNWGrTtZw1jsrDG9eaLkZRA4 1469055223 Received: from strawberry (lfbn-1-7726-61.w92-167.abo.wanadoo.fr [92.167.139.61]) by mail.messagingengine.com (Postfix) with ESMTPA id C33AFCCDAC; Wed, 20 Jul 2016 18:53:42 -0400 (EDT) From: Nicolas Petton To: Stefan Monnier , 24042@debbugs.gnu.org Subject: Re: bug#24042: mudraw doesn't exist any more In-Reply-To: References: User-Agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.1.50.1 (x86_64-unknown-linux-gnu) Date: Thu, 21 Jul 2016 00:53:30 +0200 Message-ID: <87vazz9b11.fsf@petton.fr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24042 Cc: 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: -0.7 (/) --=-=-= Content-Type: text/plain Stefan Monnier writes: Hi Stefan, > 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? Nico --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJXkADqAAoJECM1h6R8IHkQCkkH/RQXfAxC3xPBBsT7Bed9wrZB 4OsXxmMIaniWPtfT7o9wIgnmfz50Tc7EqUTV4ii5TfILDuyw9veYEs6caN7S8aCi 8Wg8i5Uj/0SMwI+XWOVB6155pPMUap26NVcb+SZI83ER6pU82IAWxqjAaQ8ySw57 4C4Z/DG2myC9YiA2IjobdY+lThjFrK4QajppAiOOTJGNXg93LbP0MzvTyUeOVImn FwHDjgQMh30P5ghMEASEdLJMEK++TUGyzGc9o6nQyLGSS2IfDg5agzVOebGrpTFx s+enFw9pVnGzesppdt1Oh23hAyUYF3MwU38d/1lze2+7YOQRHyRUE8aprrzheJs= =JBya -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 21:17:15 2016 Received: (at 24042) by debbugs.gnu.org; 21 Jul 2016 01:17:15 +0000 Received: from localhost ([127.0.0.1]:59109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ2by-0004nu-Gx for submit@debbugs.gnu.org; Wed, 20 Jul 2016 21:17:15 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ2bw-0004nh-N3 for 24042@debbugs.gnu.org; Wed, 20 Jul 2016 21:17:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxFgA731xV/3mcpUVcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjEAs0EhQYDSSINwjPIwEBAQEGAQEBAR6LOoQhZAeELQEEi0Sne4FFI4QUIoJ4AQEB X-IPAS-Result: A0AxFgA731xV/3mcpUVcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjEAs0EhQYDSSINwjPIwEBAQEGAQEBAR6LOoQhZAeELQEEi0Sne4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="248713059" Received: from 69-165-156-121.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.165.156.121]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Jul 2016 21:17:06 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 8CC3BAE0F1; Wed, 20 Jul 2016 21:17:06 -0400 (EDT) From: Stefan Monnier To: Nicolas Petton Subject: Re: bug#24042: mudraw doesn't exist any more Message-ID: References: <87vazz9b11.fsf@petton.fr> Date: Wed, 20 Jul 2016 21:17:06 -0400 In-Reply-To: <87vazz9b11.fsf@petton.fr> (Nicolas Petton's message of "Thu, 21 Jul 2016 00:53:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 24042 Cc: Tassilo Horn , 24042@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: 0.3 (/) >> 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 other tool (pdfdraw or mudraw) happens to match the regexp things will go wrong. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 21:33:13 2016 Received: (at 24042) by debbugs.gnu.org; 21 Jul 2016 01:33:13 +0000 Received: from localhost ([127.0.0.1]:59123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ2rR-0005Bp-45 for submit@debbugs.gnu.org; Wed, 20 Jul 2016 21:33:13 -0400 Received: from mail-qt0-f180.google.com ([209.85.216.180]:36844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ2rP-0005BY-N6 for 24042@debbugs.gnu.org; Wed, 20 Jul 2016 21:33:12 -0400 Received: by mail-qt0-f180.google.com with SMTP id 52so36168663qtq.3 for <24042@debbugs.gnu.org>; Wed, 20 Jul 2016 18:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TD03U5Zqyx8u8m0Dqfmw/hiBt8tFjrU+p1GH3/Gn4L8=; b=CvaV1PrlkL7as1iCB2A0/lA9dryIkl1N4xaRUo11oaKvzOCsWGLDcNHTPkuAWt/gC/ DtS+Tl6h/cxG3P4eQTqub7GMrM/MzPg9k/DBVkTWNwTFVjRfXBkZCgCvBFnhZ53wpmFI vV9TZvfUeHZBiq2A2FhUlzLd2B8MauRmM3vvz+6YpHYCfl5t4UkMebnL1Urc92zmopHl PeeRiCNSDZqT4VcwCRizYEHjR9TMdqgMavmGYKCbEPmD79R77AwaBlq9SCZ59G79PbW+ 5Fmw6kaSX5VlPaXX9GYyZiyjB8B/vYAnxPPyqchXnvAJzfBCuQ0pfClmWAhLWHuDj2d1 hgJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=TD03U5Zqyx8u8m0Dqfmw/hiBt8tFjrU+p1GH3/Gn4L8=; b=b2G3pU6HYPBACGDU07czpXpXNLdvZRZJOz/521Yb0rUNki5ejUUofMPNIgJwoA0OTf 4UI3cVOZbwUlZF0Xelatr2qzxjM1kZVYOdzJaZggfhZy/C6lLfv38wPC1GMBSr/ht5sn J+A9rLwvudJy6ir8wFZykFDPx/qQeSpeXLfH0JSMeVBnMxdIrMhqeklBp9VESHx8c/Po tQYhBOTr85DyRfajBitUv+jGKIMW6gdZhK7UlnCZoPLfKfJZtr2gS4QvIqqWRLxlvyhq jOHCqMaWlg/bxZCnoBhvodkY5QfNa27KQgp7KpWUYc8IaT4QZU6w5vXsOGIxHMSpEHlS fBtw== X-Gm-Message-State: ALyK8tJS6N93zDuIHsC/H6ceEfflhDpt1cVPuylySeoHFtEbAvw4MfEgWZteoQ/pBSsyJD26 X-Received: by 10.237.35.146 with SMTP id j18mr48767000qtc.35.1469064786270; Wed, 20 Jul 2016 18:33:06 -0700 (PDT) Received: from holos.localdomain (ip68-100-200-121.dc.dc.cox.net. [68.100.200.121]) by smtp.gmail.com with ESMTPSA id d190sm3028871qke.18.2016.07.20.18.33.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jul 2016 18:33:05 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 9E6F566C35; Wed, 20 Jul 2016 21:33:04 -0400 (EDT) From: Mark Oteiza To: Stefan Monnier Subject: Re: bug#24042: mudraw doesn't exist any more References: <87vazz9b11.fsf@petton.fr> Date: Wed, 20 Jul 2016 21:33:04 -0400 In-Reply-To: (Stefan Monnier's message of "Wed, 20 Jul 2016 21:17:06 -0400") Message-ID: <87zipb3hdb.fsf@udel.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24042 Cc: Nicolas Petton , Tassilo Horn , 24042@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: -0.7 (/) 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 other > tool (pdfdraw or mudraw) happens to match the regexp things will go wrong. 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 21:55:26 2016 Received: (at 24042) by debbugs.gnu.org; 21 Jul 2016 01:55:26 +0000 Received: from localhost ([127.0.0.1]:59133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ3Cw-0005g9-D2 for submit@debbugs.gnu.org; Wed, 20 Jul 2016 21:55:26 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ3Cu-0005fw-RP for 24042@debbugs.gnu.org; Wed, 20 Jul 2016 21:55:25 -0400 Received: by mail-qk0-f193.google.com with SMTP id p126so5367496qke.1 for <24042@debbugs.gnu.org>; Wed, 20 Jul 2016 18:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4oIMSptmyz66Db1g4D1ysO9Vlk7itiRvsEjf4MtW+qg=; b=pgzz3J6n+hI0TCU6dvR0mpNixPP9nGF9jaoOBZJQUx66qYLGeW94l9usrMw01kvzcx MKVzBVR2GQE4XAkMJ5LocDumdV8KY/GkdTwujkfsTQ/48Xhr8kTHguPlD11LaC1D/rYw dEB/XHQLzbOsg1WbVXTk9w6xotoAaHJj9GizB50yvFZGPlMj+lsxKy++70ppEO1VAT48 Bvm5ykmCOoVrPu8u/4Wys5zy8JMSow4a7vnm9xqTcUQtFZmuA6HqO+E1tf7gpO1787SD 1VebKalbRqxUIKtePWGE0AEZIuJktyWMPn2tiig/+068BQteHK5WDxHZBgDb9HHFVkG+ nlFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4oIMSptmyz66Db1g4D1ysO9Vlk7itiRvsEjf4MtW+qg=; b=mWUp+6WTsv5jPnz92zFw/GflW1Sg/T6ziQranUCxDA9ui5kZTn0kSVrZHV+fOLyOx3 1CoTu/eEHcsjjXO/9YGpdgPKg4nOr96Tbj96X6+5hi2BPr7msnMnYr91eCAM4fDjAwEX nqA2/Vcz1SwqmdMUhpXFobYgCkNZ4QmZsWP1hNwE2rTTlEEZg3wz91XJxbUVCg8x+5oq lxeNTf2m5hHb82Krwf84JvIF/RMxwo1J2MQNCcE3mz7xvS2J0g2PF1KHYotOjtCW6DG8 lry/2LX1tqIBrIQLiu34u23mUSJBBCR9K4dOUaWfnJWDvTxGsvfbbPf66SKGXDHrt80h V6ng== X-Gm-Message-State: ALyK8tIrR4xwbNM4vz+Nv0Zk362J5y3DSxuz0quBlQYtegC+YTME/tmcfbXJ5+lYCZQlINa0 X-Received: by 10.55.201.136 with SMTP id m8mr15772387qkl.166.1469066119217; Wed, 20 Jul 2016 18:55:19 -0700 (PDT) Received: from holos.localdomain (ip68-100-200-121.dc.dc.cox.net. [68.100.200.121]) by smtp.gmail.com with ESMTPSA id d190sm3073123qke.18.2016.07.20.18.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jul 2016 18:55:18 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 9884D66C35; Wed, 20 Jul 2016 21:55:17 -0400 (EDT) From: Mark Oteiza To: Stefan Monnier Subject: Re: bug#24042: mudraw doesn't exist any more References: <87vazz9b11.fsf@petton.fr> <87zipb3hdb.fsf@udel.edu> Date: Wed, 20 Jul 2016 21:55:17 -0400 In-Reply-To: <87zipb3hdb.fsf@udel.edu> (Mark Oteiza's message of "Wed, 20 Jul 2016 21:33:04 -0400") Message-ID: <87shv3ycu2.fsf@udel.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24042 Cc: Nicolas Petton , Tassilo Horn , 24042@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: -0.7 (/) Mark Oteiza writes: > 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 other >> tool (pdfdraw or mudraw) happens to match the regexp things will go wrong. > > 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. 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") (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)))) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 23:47:25 2016 Received: (at submit) by debbugs.gnu.org; 21 Jul 2016 03:47:25 +0000 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 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 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 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 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 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 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 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 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 Subject: Re: bug#24042: mudraw doesn't exist any more To: bug-gnu-emacs@gnu.org References: <87vazz9b11.fsf@petton.fr> <87zipb3hdb.fsf@udel.edu> <87shv3ycu2.fsf@udel.edu> From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Message-ID: <728b2103-88d6-ae1d-ca06-c8fb4ce72d38@gmail.com> Date: Wed, 20 Jul 2016 23:46:56 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87shv3ycu2.fsf@udel.edu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="A4fsH0XgWrHXLvjUfCMq2LnMoc6KLOvfc" 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) 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-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 09:17:13 2020 Received: (at 24042) by debbugs.gnu.org; 4 Sep 2020 13:17:13 +0000 Received: from localhost ([127.0.0.1]:37985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEBaa-00035F-UY for submit@debbugs.gnu.org; Fri, 04 Sep 2020 09:17:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEBaZ-00034y-7Y for 24042@debbugs.gnu.org; Fri, 04 Sep 2020 09:17:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fcZ0TPZwPFkFtkeNcFZ+jMRgrPS9wyHeCIs872v/g3w=; b=I9KU6xLAsz67u9XWnRviTYJsRv 1409WG7Qo6YAezdPAnIlqdI9w7JUgWYujRyQ2xF/cGZZE/N4vczLvNbLvnVZd/ZOyXPtOEkKkW+W+ n4HKFK7raUATW+0jwD7PwadBs198QkGfkOVqbEqYph4vpy3tfTEAv+4oES8Cn4+aMeAY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEBaN-0007xs-2U; Fri, 04 Sep 2020 15:17:04 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#24042: mudraw doesn't exist any more References: X-Now-Playing: The Pentangle's _Cruel Sister_: "Lord Franklin" Date: Fri, 04 Sep 2020 15:16:57 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 20 Jul 2016 17:24:17 -0400") Message-ID: <87v9gtadh2.fsf@gnus.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-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24042 Cc: Tassilo Horn , 24042@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 (-) 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. It seems like this was fixed in a somewhat different way in this commit: commit d5f629d193ffe88c464379f02dd2adaadc9dfdf0 Author: Federico Tedin AuthorDate: Sun Feb 3 13:48:31 2019 -0300 Commit: Tassilo Horn CommitDate: Mon Feb 4 16:47:00 2019 +0100 But it's basically the same idea (and has the same problems as Stefan's patch); it introduces this helper function: (defun doc-view-pdfdraw-program-subcommand () "Return the mutool subcommand replacing mudraw. Recent MuPDF distributions replaced `mudraw' with `mutool draw'." (when (string-match "mutool[^/\\]*$" doc-view-pdfdraw-program) '("draw"))) I think a better solution would have been to allow the command to be a list, for instance, so you could have '("mutool" "draw") be the command. But I guess nobody has complained, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 09:17:17 2020 Received: (at control) by debbugs.gnu.org; 4 Sep 2020 13:17:17 +0000 Received: from localhost ([127.0.0.1]:37988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEBaf-00035X-5h for submit@debbugs.gnu.org; Fri, 04 Sep 2020 09:17:17 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEBad-000356-NU for control@debbugs.gnu.org; Fri, 04 Sep 2020 09:17:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rz6AS5niOjtJlECt4lKktueGLLupj9gnLq0g0I/Titk=; b=g0cmKU8eoGwjWK+ekCs15Wvcai QVVBx8tbrJrBenQtedmfRjJUAvwcLFY97IWmfqpMNO6nkQWub7fnFMt/jpIWnVPPNZCdpMZjEQEaF hc7g9C7KleoP2jTBczx34eRFheSbTM3CFbLR0iSxJ84Njsd1Sx5DdRJVRCyOlPzloQYk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEBaW-0007y7-2m for control@debbugs.gnu.org; Fri, 04 Sep 2020 15:17:10 +0200 Date: Fri, 04 Sep 2020 15:17:06 +0200 Message-Id: <87tuwdadgt.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24042 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 24042 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) close 24042 quit From unknown Wed Jun 18 00:19: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: Sat, 03 Oct 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