From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: running some elisp code when exporting a given file Date: Thu, 05 Sep 2013 12:13:05 +0200 Message-ID: <8761ufr2z2.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHWYg-00019Z-DV for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 06:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHWYW-0000My-2f for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 06:13:02 -0400 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:54500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHWYV-0000Mm-Rg for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 06:12:51 -0400 Received: by mail-we0-f180.google.com with SMTP id u57so442418wes.25 for ; Thu, 05 Sep 2013 03:12:51 -0700 (PDT) In-Reply-To: (Alan Schmitt's message of "Thu, 05 Sep 2013 09:58:15 +0200") 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 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. Regards, -- Nicolas Goaziou