From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: [BABEL][PROPOSAL] headlines as executable srcnames Date: Thu, 09 Sep 2010 22:00:00 +0530 Message-ID: <817hiu98xj.fsf@gmail.com> References: <87zkvtn5u7.fsf@mundaneum.com> <81wrqxv1bq.fsf@gmail.com> <87r5h5gwxo.fsf@mundaneum.com> <87iq2huk7u.fsf@gmail.com> <81lj7cyhkq.fsf@gmail.com> <87lj7cz1lh.fsf@gmail.com> <817hiwqk6c.fsf_-_@gmail.com> <81k4mv7wq9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=50392 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Otk9X-00071w-AG for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 12:39:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Otk1A-0000KB-Of for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 12:30:34 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:42273) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Otk1A-0000K0-Ie for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 12:30:32 -0400 Received: by pvc30 with SMTP id 30so1037375pvc.0 for ; Thu, 09 Sep 2010 09:30:31 -0700 (PDT) In-Reply-To: <81k4mv7wq9.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 09 Sep 2010 21:08:54 +0530") 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: Eric Schulte Cc: emacs-orgmode@gnu.org 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 <> > > # Variant-2: > > Or better still something like this > > * revision control > Version of the file [[<>][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 > > [[<>][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. >