From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Embedded code Date: Fri, 21 Jan 2011 19:05:04 -0700 Message-ID: <87oc79elrj.fsf@gmail.com> References: <2324250583714673900@unknownmsgid> <87aaizhz23.fsf@gmail.com> <4D3554AC.1060303@gmail.com> <8762tmfa74.fsf@gmail.com> <871v4a2b15.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=42904 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgSqm-0003vq-L2 for emacs-orgmode@gnu.org; Fri, 21 Jan 2011 21:05:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgSql-0004Eq-F0 for emacs-orgmode@gnu.org; Fri, 21 Jan 2011 21:05:12 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:43273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgSql-0004Eg-B7 for emacs-orgmode@gnu.org; Fri, 21 Jan 2011 21:05:11 -0500 Received: by iyj17 with SMTP id 17so2688035iyj.0 for ; Fri, 21 Jan 2011 18:05:10 -0800 (PST) In-Reply-To: (Ido Magal's message of "Thu, 20 Jan 2011 19:54:23 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ido Magal Cc: emacs-orgmode@gnu.org, Rainer M Krug > > I have a few elementary questions I hope someone can bother to answer: > > 1. It seems that when org prints a list, it automatically formats it into a > table. In lisp, what's a proper way of converting a list to a string so I > can have more control over the format? My first attempts were unsuccessful. > There are a variety of ways to convert lists to strings, look at the `format' function for printing any elisp value to a string. You can also use something like the following to convert a list to a string #+begin_src emacs-lisp (mapconcat (lambda (el) (format "%S" el)) '(1 2 3 4 5 6) "\t") #+end_src > > 2. I'd like to use Org's macros to replace > > #+begin_src > (tagged "foo") > #+end_src > > with > > {{{(tagged "foo")}}} > > but Org macros only expand on export. Would it be feasible to change the > macro functionality and hook into file loading? Or is there some other way > I can slim these down to be terse? > You can use the inline code syntax for very small blocks, e.g. src_emacs-lisp{(tagged "foo")} See http://orgmode.org/manual/Structure-of-code-blocks.html Cheers -- Eric