diff mbox series

[bug#48663] gnu: Add emacs-org-inline-pdf.

Message ID fe7af910ca2905b310be739bcdefcb38cbff8298.1622014570.git.public@yoctocell.xyz
State Accepted
Headers show
Series [bug#48663] gnu: Add emacs-org-inline-pdf. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen May 26, 2021, 7:36 a.m. UTC
* gnu/packages/emacs-xyz.scm (emacs-org-inline-pdf): New variable.
---
 gnu/packages/emacs-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)


base-commit: 0ffac75ece4f22a8595e19b8a375791e87d365aa

Comments

Xinglu Chen May 26, 2021, 7:54 a.m. UTC | #1
On Wed, May 26 2021, Xinglu Chen wrote:

> +(define-public emacs-org-inline-pdf
> +  (package
> +    (name "emacs-org-inline-pdf")
> +    (version "0.2")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/shg/org-inline-pdf.el")
> +                    (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "1qc92xvgxmnwjixk8bxwbc1l1jj0qk9dg73jyaip6lk4g0wjk6xf"))))
> +    (build-system emacs-build-system)
> +    (inputs
> +     `(("pdf2svg" ,pdf2svg)))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch-exec-paths
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (let ((pdf2svg (assoc-ref inputs "pdf2svg")))
> +               (substitute* "org-inline-pdf.el"
> +                 (("\"pdf2svg\"") (string-append "\"" pdf2svg "/bin/pdf2svg\"")))))))))
> +    (home-page "https://github.com/shg/org-inline-pdf.el")
> +    (synopsis "Inline PDF previewing for Org ")
                                               ^^
Oops, trailing whitespace.  Should I add a linter check for this?
Nicolas Goaziou May 26, 2021, 12:52 p.m. UTC | #2
Hello,

Xinglu Chen <public@yoctocell.xyz> writes:

> On Wed, May 26 2021, Xinglu Chen wrote:
>
>> +(define-public emacs-org-inline-pdf

Patch applied. Thank you.

> Oops, trailing whitespace.  Should I add a linter check for this?

Isn't it the case already? There's a `report-trailing-white-space'
checker in "lint.scm".

Regards,
Xinglu Chen May 26, 2021, 2:10 p.m. UTC | #3
On Wed, May 26 2021, Nicolas Goaziou wrote:

>> Oops, trailing whitespace.  Should I add a linter check for this?
>
> Isn't it the case already? There's a `report-trailing-white-space'
> checker in "lint.scm".

I think this one only checks the lines and not the text inside of the
synopsis string.
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 886320cc34..22918c8f9b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4635,6 +4635,36 @@  strike through completed TODO headings, changes Org blocks, changes Org check
 boxes, and more.")
       (license license:gpl3+))))
 
+(define-public emacs-org-inline-pdf
+  (package
+    (name "emacs-org-inline-pdf")
+    (version "0.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/shg/org-inline-pdf.el")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qc92xvgxmnwjixk8bxwbc1l1jj0qk9dg73jyaip6lk4g0wjk6xf"))))
+    (build-system emacs-build-system)
+    (inputs
+     `(("pdf2svg" ,pdf2svg)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-exec-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((pdf2svg (assoc-ref inputs "pdf2svg")))
+               (substitute* "org-inline-pdf.el"
+                 (("\"pdf2svg\"") (string-append "\"" pdf2svg "/bin/pdf2svg\"")))))))))
+    (home-page "https://github.com/shg/org-inline-pdf.el")
+    (synopsis "Inline PDF previewing for Org ")
+    (description "This package provides a minor mode that enables
+inline PDF preview in Org buffers by using pdf2svg.")
+    (license license:gpl3+)))
+
 (define-public emacs-org-rich-yank
   (package
     (name "emacs-org-rich-yank")