From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hetzner 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 Message-ID: <8761okstlw.wl%egh@e6h.org> Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDTol-0003p2-Uq for emacs-orgmode@gnu.org; Wed, 12 Feb 2014 02:01:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDTog-0001Ze-D0 for emacs-orgmode@gnu.org; Wed, 12 Feb 2014 02:01:11 -0500 Received: from mail-pb0-x236.google.com ([2607:f8b0:400e:c01::236]:59279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDTog-0001ZW-5y for emacs-orgmode@gnu.org; Wed, 12 Feb 2014 02:01:06 -0500 Received: by mail-pb0-f54.google.com with SMTP id uo5so8868100pbc.13 for ; Tue, 11 Feb 2014 23:01:04 -0800 (PST) Received: from michel.e6h.org (50-0-83-149.dsl.static.sonic.net. [50.0.83.149]) by mx.google.com with ESMTPSA id vf7sm60165397pbc.5.2014.02.11.23.01.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Feb 2014 23:01:03 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode 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 .