[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Emacs lisp code export difference between `org-export-region-as-

From: thorne
Subject: Re: [O] 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

Actually I think I have a simpler version of this question now.
I have this function:

     (defun render-one (file)
         (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 <pre> tags and angle brackets changed to html

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]