Hi all,

I'd like to perform Elisp operations on org-mode buffer while exporting.

Something like this (the comma unquotes like in Lisp quasiquote):

,(setq foo "(defun square (x)\n  (* x x))")

#+begin_src lisp
,foo
#+end_src

#+BEGIN_HTML
,(with-current-buffer
       (with-current-buffer (get-buffer-create "*temp*")
         (lisp-mode)
         (insert (upcase foo))
         (htmlize-buffer))
     (kill-buffer "*temp*")
     (buffer-string))
#+END_HTML

And I want it to be equivalent to:

#+begin_src lisp
(defun square (x)
  (* x x))
#+end_src

#+BEGIN_HTML
<!-- html equivalent to above code upcased and fontified -->
#+END_HTML

Is something like this possible?

regards,
Oleh

Reply via email to