From: "Eric Schulte" <schulte.eric@gmail.com>
To: Ido Magal <ido@idomagal.com>
Cc: emacs-orgmode@gnu.org, Rainer M Krug <r.m.krug@gmail.com>
Subject: Re: Embedded code
Date: Fri, 21 Jan 2011 19:05:04 -0700 [thread overview]
Message-ID: <87oc79elrj.fsf@gmail.com> (raw)
In-Reply-To: <AANLkTi=PccKOfjL26W6PRzwA-aAsXMM6sRovSgnh8nk8@mail.gmail.com> (Ido Magal's message of "Thu, 20 Jan 2011 19:54:23 -0800")
>
> 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
next prev parent reply other threads:[~2011-01-22 2:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 16:06 Embedded code Ido Magal
2011-01-17 22:01 ` Ido Magal
2011-01-17 23:48 ` Eric Schulte
2011-01-18 8:51 ` Rainer M Krug
2011-01-18 16:16 ` Eric Schulte
2011-01-18 16:44 ` Rainer M Krug
2011-01-18 17:12 ` Ido Magal
2011-01-18 18:35 ` Nick Dokos
2011-01-18 20:42 ` Eric Schulte
2011-01-19 6:46 ` Ido Magal
2011-01-21 3:54 ` Ido Magal
2011-01-22 2:05 ` Eric Schulte [this message]
2011-01-22 2:10 ` Ido Magal
2011-01-25 4:41 ` Ido Magal
2011-01-25 17:16 ` Eric Schulte
2011-01-26 4:44 ` Ido Magal
2011-01-26 4:54 ` Eric Schulte
2011-01-27 20:45 ` Ido Magal
2011-01-26 9:41 ` Sébastien Vauban
2011-01-27 22:51 ` Eric Schulte
2011-02-04 6:52 ` Ido Magal
2011-02-04 20:35 ` Eric Schulte
2011-01-19 23:54 ` Dan Davison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oc79elrj.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=ido@idomagal.com \
--cc=r.m.krug@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).