From patchwork Wed May 26 14:16:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 29604 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8FC4627BC81; Wed, 26 May 2021 15:17:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 97D7A27BC78 for ; Wed, 26 May 2021 15:17:18 +0100 (BST) Received: from localhost ([::1]:39924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lluLV-0007fP-PU for patchwork@mira.cbaines.net; Wed, 26 May 2021 10:17:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lluLG-0007ZO-Tz for guix-patches@gnu.org; Wed, 26 May 2021 10:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38131) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lluLG-0001Ts-Mg for guix-patches@gnu.org; Wed, 26 May 2021 10:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lluLG-0007ZX-GK for guix-patches@gnu.org; Wed, 26 May 2021 10:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48650] [PATCH] gnu: Add emacs-org-pandoc-import. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 May 2021 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48650 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48650@debbugs.gnu.org Cc: Nicolas Goaziou Received: via spool by 48650-submit@debbugs.gnu.org id=B48650.162203857726872 (code B ref 48650); Wed, 26 May 2021 14:17:02 +0000 Received: (at 48650) by debbugs.gnu.org; 26 May 2021 14:16:17 +0000 Received: from localhost ([127.0.0.1]:49677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lluKX-0006z0-Cw for submit@debbugs.gnu.org; Wed, 26 May 2021 10:16:17 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:54500 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lluKS-0006pD-B5 for 48650@debbugs.gnu.org; Wed, 26 May 2021 10:16:16 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622038565; bh=aUuyQU56VGWxPL/TaugChSKm7YonoOLFo7zgkCTlsJ4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=KTfh6PXtB9boPHhsKzDp6RzLV4cw+U4UMfbubNoMI++ISWcOxDcWkLc2eXK/DD1di P2Iw9tu0Goa6+NLG6sy21M5w+ytMKafYB2GXvx+gyf4Ltm4zocnZ7GcXp77rJ5lQRf i6sQSgGruyarYohgUTnKK5iiaF+bcoJ63j+K/vDI= In-Reply-To: <347e7d7d2fca562cf038cc7acb3a203862397d7f.1621940480.git.public@yoctocell.xyz> References: <347e7d7d2fca562cf038cc7acb3a203862397d7f.1621940480.git.public@yoctocell.xyz> Message-Id: <178f31d0982ecef74639b57220d20cc2465fa7d8.1622038463.git.public@yoctocell.xyz> Date: Wed, 26 May 2021 16:16:04 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 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: + +@enumerate +@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: +@itemize +@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")