From mboxrd@z Thu Jan 1 00:00:00 1970 From: thorne Subject: Re: Emacs lisp code export difference between `org-export-region-as-html' and `org-export-as-html' Date: Mon, 24 Sep 2012 15:53:00 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGGaM-0000u1-Tb for emacs-orgmode@gnu.org; Mon, 24 Sep 2012 17:53:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGGaM-0004To-0F for emacs-orgmode@gnu.org; Mon, 24 Sep 2012 17:53:02 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:63796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGGaL-0004Tk-L2 for emacs-orgmode@gnu.org; Mon, 24 Sep 2012 17:53:01 -0400 Received: by lbok6 with SMTP id k6so777347lbo.0 for ; Mon, 24 Sep 2012 14:53:00 -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: emacs-orgmode@gnu.org Actually I think I have a simpler version of this question now. I have this function: (defun render-one (file) (with-temp-buffer (insert-file file) (org-export-as-html nil nil nil 'string t))) With the last line being the important bit. If I open a file, foo.org, that has the #+BEING_SRC bit that I want to export, and put this line in the buffer and evaluate it: (org-export-as-html nil nil nil 'string t) then the result I get is correct -- the html that I want is embedded in the resulting string. But if instead I evaluate (render-one "~/foo.org") using the function above which should (I assume) do the same thing, it does not work. Instead, the html code I want is wrapped in
 tags and angle brackets changed to html
entities.

So, it seems that something about running the export function in
my code above makes it ignore my :results html setting in the
code block.  Is this a security thing?  Is there a variable that
I need to let-bind in my function or something?

Thanks for any help.