* bug#52170: 29.0.50; [PATCH] Use mupdf in doc-view-mode if gs is not installed
[not found] <m18rx7dg83.fsf.ref@yahoo.es>
@ 2021-11-28 23:15 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 14:48 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-28 23:15 UTC (permalink / raw)
To: 52170
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
The Emacs manual says that mupdf (mudraw) can be used to render
PDF/PostScript documents in doc-view-mode. However, I couldn't make it
work on a macOS system with only mupdf installed (no Ghostscript).
The fix seems to be simple, and with the attached patch I'm able to
render and browse PDFs correctly. All doc-view features described in
the manual seem to work just fine.
If you think the patch is a good idea, please install it on my behalf.
Thanks.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-mupdf-in-doc-view-mode-if-gs-is-not-installed.patch --]
[-- Type: text/x-patch, Size: 1197 bytes --]
From 3a0fcc8a24923b997d6737082f0125de02778e9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= <mardani29@yahoo.es>
Date: Sun, 28 Nov 2021 23:59:05 +0100
Subject: [PATCH] Use mupdf in doc-view-mode if gs is not installed
* lisp/doc-view.el (doc-view-mode-p): Use mupdf to render PDF and
related formats if gs is not installed.
---
lisp/doc-view.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 7e113e4f34..11559bf2f5 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -811,9 +811,10 @@ doc-view-mode-p
(and doc-view-dvipdfm-program
(executable-find doc-view-dvipdfm-program)))))
((memq type '(postscript ps eps pdf))
- ;; FIXME: allow mupdf here
- (and doc-view-ghostscript-program
- (executable-find doc-view-ghostscript-program)))
+ (or (and doc-view-ghostscript-program
+ (executable-find doc-view-ghostscript-program))
+ (and doc-view-pdfdraw-program
+ (executable-find doc-view-pdfdraw-program))))
((eq type 'odf)
(and doc-view-odf->pdf-converter-program
(executable-find doc-view-odf->pdf-converter-program)
--
2.31.0
^ permalink raw reply related [flat|nested] 2+ messages in thread