From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Allow passing post-process to org-publish-org-to for use by org-export-to Date: Wed, 12 Feb 2014 23:55:52 +0100 Message-ID: <87ppmsos93.fsf@gmail.com> References: <8761okstlw.wl%egh@e6h.org> <87r478lc17.fsf@gmail.com> <874n44s6cl.wl%egh@e6h.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDiiQ-0003OC-7N for emacs-orgmode@gnu.org; Wed, 12 Feb 2014 17:55:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDiiK-0000pg-7p for emacs-orgmode@gnu.org; Wed, 12 Feb 2014 17:55:38 -0500 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:43553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDiiK-0000pL-0w for emacs-orgmode@gnu.org; Wed, 12 Feb 2014 17:55:32 -0500 Received: by mail-we0-f182.google.com with SMTP id u57so6778411wes.27 for ; Wed, 12 Feb 2014 14:55:31 -0800 (PST) In-Reply-To: <874n44s6cl.wl%egh@e6h.org> (Erik Hetzner's message of "Wed, 12 Feb 2014 07:23:06 -0800") 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: Erik Hetzner Cc: Org Mode Erik Hetzner writes: > Thanks very much for your response (and ox.el)! I looked at filters, > but concluded they were not appropriate, because pandoc operates on > the file as a whole, and writes to a file, and can return binary > content (for example, if it is generating PDFs). Then you're correct: filters won't help. > It seemed equivalent to the way that the latex exporter uses pdflatex > to generate a PDF, and the latex exported uses a post-process > function. Not really. If you look at `org-latex-publish-to-pdf' you will see that publishing is done differently: the binary file is generated, then published as an attachment. > I could be wrong, though. It would also be convenient to have access > to the info plist; in fact, I was going to write another email about > having access to the info plist in a post-process filter. > > Is there a way to define a filter that operates on the entire content, > is guaranteed to run after everything else, and can handle binary > content? Thanks. Sort of. `org-export-filter-final-output-functions' will get you the final string, along with the info plist. You can use it to apply modifications and generate the binary file. The original output can then be discarded. Regards, -- Nicolas Goaziou