From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: running some elisp code when exporting a given file Date: Thu, 05 Sep 2013 14:39:15 +0200 Message-ID: References: <8761ufr2z2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHYqI-0002MA-3D for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 08:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHYqB-0004Gx-Sj for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 08:39:22 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:53519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHYqB-0004Gs-MG for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 08:39:15 -0400 In-reply-to: <8761ufr2z2.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode n.goaziou@gmail.com writes: > Hello, > > Alan Schmitt writes: > >> I would like to inline a css when exporting a file to html, but I don't >> know how to tell org-mode to set the variable org-html-head from within >> the file. >> >> Here is what I tried: I added the following block at the beginning of my >> file: >> >> #+BEGIN_SRC emacs-lisp :exports none >> (set (make-local-variable 'org-html-head) (concat >> "\n")) >> #+END_SRC >> >> It does not seem to be evaluated, however. >> >> Is there a way to have arbitrary code stored in the file being exported >> being evaluated before an export? > > I think this has to do with ":exports none", which means that code will > not be evaluated during export. You may want to try setting the > attribute to some other value, and put the block in a :noexport: entry. Thanks a lot, this was it. Alan