From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Macro that calls external program Date: Mon, 11 Mar 2019 12:03:50 -0700 Message-ID: <874l89z10p.fsf@ericabrahamsen.net> References: <87pnqxsvir.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:58773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3QHF-0002gu-Us for emacs-orgmode@gnu.org; Mon, 11 Mar 2019 15:08:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3QDP-0004bH-B2 for emacs-orgmode@gnu.org; Mon, 11 Mar 2019 15:03:59 -0400 Received: from [195.159.176.226] (port=40434 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3QDP-0004aV-3F for emacs-orgmode@gnu.org; Mon, 11 Mar 2019 15:03:59 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1h3QDM-000tAJ-4y for emacs-orgmode@gnu.org; Mon, 11 Mar 2019 20:03:56 +0100 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" To: emacs-orgmode@gnu.org Josh writes: > Thanks! This is very helpful. > > I have a related question. How can I run an external program right > before Export that takes as input the current buffer and prints out to > stdout an updated version of the org file that then is exported? > Basically I want to pipe the org file through a filter that is an > external program before it is exported. Probably one of `org-export-before-parsing-hook' or `org-export-before-processing-hook' is where you'd hang a custom function that does this.