emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Erik Hetzner <egh@e6h.org>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Allow passing post-process to org-publish-org-to for use by org-export-to
Date: Tue, 11 Feb 2014 23:00:43 -0800	[thread overview]
Message-ID: <8761okstlw.wl%egh@e6h.org> (raw)

Hi,

I have been looking at publishing to HTML using pandoc. Because pandoc
requires post-processing to transform the org-mode markdown output to
other formats, it is necessary to use the post-process parameter of
org-export-to-file. Unfortunately, it is not currently possible to
pass post-process through to org-export-to-file via
org-publish-org-to. The attached patch allows this.

I think this patch makes sense; let me know what you think.

best, Erik
---
 lisp/ox-publish.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 9669bf0..9840bb6 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -558,7 +558,7 @@ matching filenames."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Tools for publishing functions in back-ends
 
-(defun org-publish-org-to (backend filename extension plist &optional pub-dir)
+(defun org-publish-org-to (backend filename extension plist &optional pub-dir post-process)
   "Publish an Org file to a specified back-end.
 
 BACKEND is a symbol representing the back-end used for
@@ -592,7 +592,8 @@ Return output file name."
                  `(:filter-final-output
                    ,(cons 'org-publish-collect-numbering
                           (cons 'org-publish-collect-index
-                                (plist-get plist :filter-final-output))))))))
+                                (plist-get plist :filter-final-output)))))
+                post-process)))
       ;; Remove opened buffer in the process.
       (unless visitingp (kill-buffer work-buffer)))))
 
-- 
1.8.3.2

-- 
Sent from my free software system <http://fsf.org/>.

             reply	other threads:[~2014-02-12  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  7:00 Erik Hetzner [this message]
2014-02-12 13:02 ` [PATCH] Allow passing post-process to org-publish-org-to for use by org-export-to Nicolas Goaziou
2014-02-12 15:23   ` Erik Hetzner
2014-02-12 22:55     ` Nicolas Goaziou
2014-02-13  3:08       ` Erik Hetzner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761okstlw.wl%egh@e6h.org \
    --to=egh@e6h.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).