diff mbox series

[bug#48650] gnu: Add emacs-org-pandoc-import.

Message ID 178f31d0982ecef74639b57220d20cc2465fa7d8.1622038463.git.public@yoctocell.xyz
State Accepted
Headers show
Series [bug#48650] gnu: Add emacs-org-pandoc-import. | expand


Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen May 26, 2021, 2:16 p.m. UTC
* gnu/packages/emacs-xyz.scm (emacs-org-pandoc-import): New variable.
Changes since v1:
* Make synopsis and description more neutral.

 gnu/packages/emacs-xyz.scm | 49 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

base-commit: 3f2a4b098039bd374c76d524223de3c6c475f23e


Nicolas Goaziou June 2, 2021, 7:52 p.m. UTC | #1

Xinglu Chen <public@yoctocell.xyz> writes:

> * gnu/packages/emacs-xyz.scm (emacs-org-pandoc-import): New variable.

Applied, with a simplification of the description. Thank you.

diff mbox series


diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 886320cc34..1467ce555a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -7115,6 +7115,55 @@  It also prettifies Org plain list bullets by:
 Features degrade gracefully when viewed from terminal.")
     (license license:gpl3+)))
+(define-public emacs-org-pandoc-import
+  (package
+    (name "emacs-org-pandoc-import")
+    (version "1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tecosaur/org-pandoc-import/")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00z9bpm975mlyqlxbyib3j547br6kvcam04b70qkmq22vh8yf341"))))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:include
+       (cons* "^filters\\/" "^preprocessors" %default-include)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-exec-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((pandoc (assoc-ref inputs "pandoc")))
+               (substitute* "org-pandoc-import.el"
+                 (("\"pandoc\"") (string-append "\"" pandoc "/bin/pandoc\"")))))))))
+    (inputs
+     `(("pandoc" ,pandoc)))
+    (home-page "https://github.com/tecosaur/org-pandoc-import/")
+    (synopsis "Read and edit non-Org file types in Org")
+    (description "This package uses Pandoc to convert selected file types to
+Org.  There are two tiers of non-Org file avoidance:
+@item The basic ``get me out of here'' ---
+@code{org-pandoc-import-{to,as}-org} allows you to easily convert supported
+non-Org files to an Org file/buffer with Pandoc
+@item The ``I don’t even want to see non-org files'' ---
+@code{org-pandoc-import-transient-mode} is for you.  What it does:
+@item (via file handlers) intercepts requests for non-Org files it knows it
+can convert
+@item uses @code{org-pandoc-import-to-org} to convert the file to a temporary
+Org file
+@item opens this Org file instead
+@item exports back to the original non-Org file on save
+@end itemize
+@end enumerate")
+    (license license:gpl3+)))
 (define-public emacs-org-pomodoro
   ;; Last release version was from 2016.
   (let ((commit "aa07c11318f91219336197e62c47bc7a3d090479")