From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Re: Org list source block Date: Mon, 04 Jan 2016 17:26:53 +0200 Message-ID: <87io39xt4y.fsf@iki.fi> References: <87d1tiygzh.fsf@iki.fi> <87wprqr30h.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG72H-0000oi-Mk for emacs-orgmode@gnu.org; Mon, 04 Jan 2016 10:27:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG72C-0008Aa-M0 for emacs-orgmode@gnu.org; Mon, 04 Jan 2016 10:27:05 -0500 Received: from plane.gmane.org ([80.91.229.3]:35518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG72C-0008AF-FF for emacs-orgmode@gnu.org; Mon, 04 Jan 2016 10:27:00 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aG72B-0001KX-3T for emacs-orgmode@gnu.org; Mon, 04 Jan 2016 16:26:59 +0100 Received: from 82-181-168-52.bb.dnainternet.fi ([82.181.168.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Jan 2016 16:26:59 +0100 Received: from jarmo.hurri by 82-181-168-52.bb.dnainternet.fi with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Jan 2016 16:26:59 +0100 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 Nicolas Goaziou writes: >> Once again I fail when I try to do something very _simple_ with Org. > > You're building programmatically your document. I don't believe it > belongs to "very simple" tasks. Coming from a LaTeX background, Org is a real miracle tool, but it is difficult to figure out how to do some things that used to be so simple. Like in LaTeX you have a single \newcommand (or \newenvironment), and then you use it wherever you want to. And if you need similar document structure in multiple places, that is how a programmer always does it. >> BTW, if there is a solution to this, I think future generations might >> benefit if something about it were mentioned in the manual in section >> 11.6 "Macro replacement". > > As you noticed already, you are not using a macro. Why would it be in > macro replacement? To help the confused reader. Because people like me (common or rare case?) just think: ok, I am going to define a macro for this. Then we go to the org document and look up macros. Then we start doing online searches for macros with linebreaks. Then we find discussions on stackoverflow that say: "No you should do it with babel." Then we try to figure out how to do it with babel. Then we post here. And so on. My two absolute favorite tools from recent years are Org and Asymptote, but neither have very beginner-friendly documentation. Partially because both systems are so complex. Yeah, I know I shouldn't whine: I could write the sections myself. But others can do it better... :-) > I think something along the following lines should work. > > #+NAME: mylist > #+BEGIN_SRC org :results raw :exports none > - [ ] foo > - [ ] bar > #+END_SRC > > #+CALL: mylist() :results raw > #+RESULTS: > #+CALL: mylist() :results raw > #+RESULTS: This worked after adding org to org-babel-do-load-languges. Thanks! Jarmo