GNU bug report logs -
#24042
mudraw doesn't exist any more
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Wed, 20 Jul 2016 21:23:02 UTC
Severity: normal
Found in version 25.1.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24042 in the body.
You can then email your comments to 24042 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
tsdh <at> gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Wed, 20 Jul 2016 21:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
New bug report received and forwarded. Copy sent to
tsdh <at> gnu.org, bug-gnu-emacs <at> gnu.org
.
(Wed, 20 Jul 2016 21:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Wed, 20 Jul 2016 22:54:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24042 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Thu, 21 Jul 2016 01:18:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 24042 <at> debbugs.gnu.org (full text, mbox):
>> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Thu, 21 Jul 2016 01:34:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 24042 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Thu, 21 Jul 2016 01:56:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24042 <at> debbugs.gnu.org (full text, mbox):
Mark Oteiza <mvoteiza <at> udel.edu> writes:
> Stefan Monnier <monnier <at> iro.umontreal.ca> 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))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Thu, 21 Jul 2016 03:48:02 GMT)
Full text and
rfc822 format available.
Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Alternatively, we could change from a program name to a function that builds 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 <mvoteiza <at> udel.edu> writes:
>
>> Stefan Monnier <monnier <at> iro.umontreal.ca> 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))))
>
>
>
>
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24042
; Package
emacs
.
(Fri, 04 Sep 2020 13:18:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 24042 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> 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 <federicotedin <at> gmail.com>
AuthorDate: Sun Feb 3 13:48:31 2019 -0300
Commit: Tassilo Horn <tsdh <at> gnu.org>
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
bug closed, send any further explanations to
24042 <at> debbugs.gnu.org and Stefan Monnier <monnier <at> iro.umontreal.ca>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 04 Sep 2020 13:18:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 03 Oct 2020 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.