From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: running some elisp code when exporting a given file Date: Thu, 05 Sep 2013 11:07:09 +0100 Message-ID: <87mwnrr38y.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHWTB-0008Cx-Ar for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 06:07:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHWT2-0006cC-SV for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 06:07:21 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHWT2-0006c4-Lw for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 06:07:12 -0400 Received: by mail-wi0-f181.google.com with SMTP id c10so1604154wiw.8 for ; Thu, 05 Sep 2013 03:07:11 -0700 (PDT) In-reply-to: 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: Alan Schmitt Cc: emacs-orgmode Hi Alan, Alan Schmitt writes: > Is there a way to have arbitrary code stored in the file being exported > being evaluated before an export? I think you can use org-export-before-processing-hook for this. """ 12.13 Advanced configuration ============================ Hooks ----- Two hooks are run during the first steps of the export process. The first one, 'org-export-before-processing-hook' is called before expanding macros, Babel code and include keywords in the buffer. The second one, 'org-export-before-parsing-hook', as its name suggests, happens just before parsing the buffer. Their main use is for heavy duties, that is duties involving structural modifications of the document. For example, one may want to remove every headline in the buffer during export. """ Myles