GNU bug report logs - #51803
[PATCH] gnu: emacs: Make DocView PDF work out of the box.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Sat, 13 Nov 2021 07:27:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

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 51803 in the body.
You can then email your comments to 51803 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51803; Package guix-patches. (Sat, 13 Nov 2021 07:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 13 Nov 2021 07:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: emacs: Make DocView PDF work out of the box.
Date: Sat, 13 Nov 2021 07:44:57 +0100
* gnu/packages/emacs.scm (emacs)[patch-program-file-names]: Add patches for
the programs “gs”, “dvipdf”, “ps2pdf” and “pdftotext”.
[inputs]: Add ghostscript and poppler.
---
This patch might be simplified post core-updates merge by using
search-input-file.

 gnu/packages/emacs.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 22d8db3839..7cc726be6f 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -18,7 +18,7 @@
 ;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2019 Jesse John Gildersleve <jessejohngildersleve <at> zohomail.eu>
 ;;; Copyright © 2019 Valentin Ignatev <valentignatev <at> gmail.com>
-;;; Copyright © 2019 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
+;;; Copyright © 2019, 2021 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
 ;;; Copyright © 2019 Amin Bandali <bandali <at> gnu.org>
 ;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith <at> outlook.com>
@@ -54,6 +54,7 @@ (define-module (gnu packages emacs)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)     ; for librsvg
   #:use-module (gnu packages gtk)
@@ -63,6 +64,7 @@ (define-module (gnu packages emacs)
   #:use-module (gnu packages mail)      ; for mailutils
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -128,7 +130,7 @@ (define-public emacs
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-program-file-names
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (substitute* '("src/callproc.c"
                             "lisp/term.el"
                             "lisp/htmlfontify.el"
@@ -136,6 +138,17 @@ (define-public emacs
                             "lisp/progmodes/sh-script.el")
                (("\"/bin/sh\"")
                 (format #f "~s" (which "sh"))))
+             (substitute* "lisp/doc-view.el"
+               (("\"(gs|dvipdf|ps2pdf)\"" all what)
+                (let ((ghostscript (assoc-ref inputs "ghostscript")))
+                  (if ghostscript
+                      (string-append "\"" ghostscript "/bin/" what "\"")
+                      all)))
+               (("\"(pdftotext)\"" all what)
+                (let ((poppler (assoc-ref inputs "poppler")))
+                  (if poppler
+                      (string-append "\"" poppler "/bin/" what "\"")
+                      all))))
              #t))
          (add-before 'configure 'fix-/bin/pwd
            (lambda _
@@ -258,6 +271,8 @@ (define* (emacs-byte-compile-directory dir)
        ("acl" ,acl)
        ("jansson" ,jansson)
        ("gmp" ,gmp)
+       ("ghostscript" ,ghostscript)
+       ("poppler" ,poppler)
 
        ;; When looking for libpng `configure' links with `-lpng -lz', so we
        ;; must also provide zlib as an input.
-- 
2.33.1






Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Fri, 03 Dec 2021 20:42:02 GMT) Full text and rfc822 format available.

Notification sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
bug acknowledged by developer. (Fri, 03 Dec 2021 20:42:02 GMT) Full text and rfc822 format available.

Message #10 received at 51803-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: 51803-done <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: emacs: Make DocView PDF work out of the box.
Date: Fri, 03 Dec 2021 21:41:44 +0100
Pushed as 4baeb72717481768fbc3245247018fb7629bfa37.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Jan 2022 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 115 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.