all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BABEL][PROPOSAL] headlines as executable srcnames
Date: Sun, 19 Sep 2010 22:15:21 -0600	[thread overview]
Message-ID: <87lj6xcap2.fsf@gmail.com> (raw)
In-Reply-To: <817hiwqk6c.fsf_-_@gmail.com> (Jambunathan K.'s message of "Wed, 08 Sep 2010 21:52:51 +0530")

Jambunathan K <kjambunathan@gmail.com> writes:

[...]
>
> If headlines are considered as code blocks one actually inflate
> headlines and execute them for interesting side-effects.

Rather than create new syntax allowing headlines to be interpreted as
Org-mode code blocks, we could implement this ability of finding and
extending headlines into a code block through the library of babel.
This would allow headlines to be expanded easily and concisely from
inside of other code blocks without having to make any changes or
extensions to Babel.

So for example

#+source: headline
#+begin_src emacs-lisp :var headline=top :results org
  (org-open-link-from-string (org-make-link-string headline))
  (save-restriction
    (org-narrow-to-subtree)
    (buffer-string))
#+end_src

could then be called from inside of a code block to insert the body of a
headline in the same file, e.g.

#+begin_src org
  <<headline(headline="body")>>
#+end_src

This should be useful for easily including large portions of org-mode
files into code blocks for generating letters.

If this looks good, I'll add it to the library of babel so it's
universally available.

Best -- Eric

  parent reply	other threads:[~2010-09-20  4:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 11:36 Composing letters using Org mode and the LaTeX isodoc class Sébastien Vauban
2010-09-07 18:46 ` Jambunathan K
2010-09-07 19:45   ` Sébastien Vauban
2010-09-08  0:56     ` Eric Schulte
2010-09-08  1:52       ` Thomas S. Dye
2010-09-08  4:39       ` Jambunathan K
2010-09-08 11:48         ` Sébastien Vauban
2010-09-08 15:15         ` Eric Schulte
2010-09-08 16:22           ` [BABEL][PROPOSAL] headlines as executable srcnames Jambunathan K
2010-09-08 21:30             ` Sébastien Vauban
2010-09-09 15:38             ` Jambunathan K
2010-09-09 16:30               ` Jambunathan K
2010-09-10  4:51               ` Jambunathan K
2010-09-20  4:03                 ` Eric Schulte
2010-09-20  7:39                   ` Jambunathan K
2010-09-20  4:15             ` Eric Schulte [this message]
2010-09-08 11:45       ` Composing letters using Org mode and the LaTeX isodoc class Sébastien Vauban
2010-09-08 15:38         ` Eric Schulte
2010-09-08 21:26           ` Sébastien Vauban
2010-09-10  8:51             ` Eric S Fraga
2010-09-10  9:13               ` Sébastien Vauban

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lj6xcap2.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.