From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Org list source block Date: Sun, 3 Jan 2016 09:08:47 -0800 Message-ID: References: <87d1tiygzh.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFm9H-0008PW-ST for emacs-orgmode@gnu.org; Sun, 03 Jan 2016 12:08:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFm9E-0007EW-My for emacs-orgmode@gnu.org; Sun, 03 Jan 2016 12:08:55 -0500 Received: from iport-bcv2-out.ucsd.edu ([132.239.0.73]:19830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFm9E-0007CV-EQ for emacs-orgmode@gnu.org; Sun, 03 Jan 2016 12:08:52 -0500 In-Reply-To: <87d1tiygzh.fsf@iki.fi> 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: Jarmo Hurri Cc: emacs-orgmode@gnu.org On Sun, 3 Jan 2016, Jarmo Hurri wrote: > > Greetings. > > Once again I fail when I try to do something very _simple_ with Org. > > I am trying to define a checklist and then use the same list in my > exported document in multiple locations. I don't think macros would work > here, since my org code has multiple lines. So I am trying to use > Babel. > > The idea would be the following (please ignore code block header > arguments): > > # ----------------------------------------------------------------- > * Test list > #+NAME: my-list > #+BEGIN_SRC org :exports code :results value org > - [ ] foo > - [ ] bar > #+END_SRC > > #+BEGIN_SRC org :noweb yes > <> > #+END_SRC > # ----------------------------------------------------------------- > > I have tried to do this in many different ways, but in my exported file > the checklist always appears as an unformatted code block; that is, > checklist appear as '[ ]', not as nicely formatted LaTeX boxes. I have > tried to vary ':exports' and ':results' to no avail. > > What is the correct solution to this? > Is this what you want? --8<---------------cut here---------------start------------->8--- \section{Test list} \label{sec:orgheadline1} \begin{org} \begin{itemize} \item $\square$ foo \item $\square$ bar \end{itemize} \end{org} --8<---------------cut here---------------end--------------->8--- If so, you can get it with --8<---------------cut here---------------start------------->8--- * Test list #+NAME: my-list #+BEGIN_SRC org :exports none :results value org - [ ] foo - [ ] bar #+END_SRC #+BEGIN_SRC org :noweb yes :results replace :wrap org :exports results <> #+END_SRC --8<---------------cut here---------------end--------------->8--- Assuming that (require 'ob-org) has been taken care of! HTH, Chuck