[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Embedded code

From: Ido Magal
Subject: Re: [Orgmode] Embedded code
Date: Fri, 21 Jan 2011 18:10:50 -0800

Perfect!  Thanks on both counts.

On Fri, Jan 21, 2011 at 18:05, Eric Schulte <address@hidden> wrote:
> 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")

> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]