emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BABEL][PROPOSAL] headlines as executable srcnames
Date: Thu, 09 Sep 2010 22:00:00 +0530	[thread overview]
Message-ID: <817hiu98xj.fsf@gmail.com> (raw)
In-Reply-To: <81k4mv7wq9.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 09 Sep 2010 21:08:54 +0530")


In the context of 'expanding babel macros', I think it would be useful
to think of the context in which the babel macros are expanded.

For example, if the macro is expanded with 'point' at the point of macro
call then one would be able to pull in information from the current
subtree (like property, tags etc etc)

I was looking at this post -

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29961.html

and reference to the existing #+MACRO facility within orgmode and the
need for accessing properties etc triggered this post.

Hope I could be of some help even if my thougts are a bit fragmented and
in the clouds ...

Jambunathan K.


ps: In the version control example down below the only context is
filename and it doesn't matter where the 'point' is when the macro is
expanded.

> * Revision
> #+begin_src emacs-lisp
>   (vc-working-revision (or (buffer-file-name) org-current-export-file))
> #+end_src  
>
>
> # Variant-1:
>
> * revision control
>   Version of the file is <<Revision()>>
>
> # Variant-2:
>
> Or better still something like this
>
> * revision control
>   Version of the file [[<<Revision()>>][Rev-1]]
>
>
> Following items are worthy of note:
>
> 1. The body of the headline is provided by executing the blocks
>    undeneath it.
>
>    Worth comparing this with the idea that emerged in the original post
>    - where the content of the headline is provided by the user (for
>    example a pdf link or body of a letter) and the results of the
>    execution is one that obtained by piping the results through a custom
>    exporter (latex)
>
> 2. In both cases there is no notion of a '#+results ' being created.
>
> 3. In Variant-2, the org's notion of what a link is redefined (Remember
>    extensible link syntax proposed by Samuel Wales).
>
>    Let's look at how the link is defined in the example
>
>    [[<<Revision()>>][Rev-1]]
>
>    The url portion of the link is actually a 'babel macro call' and
>    provides the content. Note how the macro call is embedded in the url
>    portion and there by hidden from human eye and Rev-1 provides a
>    placeholder. The special link face (or may be a 'babel macro face')
>    would let the user know that there are more things lurking
>    underground.
>

  reply	other threads:[~2010-09-09 16:39 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 [this message]
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
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

  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=817hiu98xj.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@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).