From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Does org export have something like Lisp quasiquote and unquote? Date: Thu, 20 Feb 2014 22:48:25 +0100 Message-ID: References: <87eh2zf1y0.fsf@gmail.com> <877g8p689i.fsf@gmail.com> <87zjll4ppc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGbUU-0007E5-GG for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 16:49:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGbUO-0007ku-Ci for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 16:49:10 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:60318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGbUO-0007ko-6H for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 16:49:04 -0500 In-Reply-To: <87zjll4ppc.fsf@gmail.com> (Eric Schulte's message of "Thu, 20 Feb 2014 13:13:51 -0500") 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: Eric Schulte Cc: org mode , Oleh Eric Schulte writes: > Oleh writes: > >>> >>> Think of code blocks as macros with optional interactive expansion. If >>> you don't execute the code block you need not ever see the results, >>> however with an additional ":exports results" header argument the code >>> block will be executed and replaced with it's results on export. >>> >>> Take a look at the (info "(org) Working With Source Code") portion of >>> the Org-mode manual. >>> >> >> Thanks, I'll look there. >> Is it possible to have a code block that evals to a string wrapped in >> #+BEGIN_HTML, #+END_HTML and be treated as a HTML block on export? >> > > Yes, see (info "(org) results"). As Eric suggested, the simplest is something like ":results value html" or ":results output html". But if you need something more involved, please keep reading. I recently had to use something similar, where the result of a code block would need to be wrapped in #+begin_src / #+end_src. After much help from this list, I ended up with this solution: http://orgmode.org/worg/org-hacks.html#sec-1-10-4 You can ignore / replace the "fetchsrc" bit with the code you want to evaluate, and adapt the "wrap-coq" to your setting. Alan