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 21:08:54 +0530 Message-ID: <81k4mv7wq9.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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=48605 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtjSy-0001SA-9J for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:55:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtjDW-0005Us-QW for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:39:19 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:60859) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtjDW-0005UP-Jb for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:39:14 -0400 Received: by pvc30 with SMTP id 30so997211pvc.0 for ; Thu, 09 Sep 2010 08:39:13 -0700 (PDT) In-Reply-To: <817hiwqk6c.fsf_-_@gmail.com> (Jambunathan K.'s message of "Wed, 08 Sep 2010 21:52:51 +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 > Jambu> I think there is a strong case for making headlines act as babel > Jambu> srcnames with their body providing content for noweb expansion > Jambu> [3]. This behaviour could be controlled by a buffer local > Jambu> variable. I have some more thoughts on this. Let me capture it before it goes away. My thoughts are fragmented and my only request is that it be noted and embraced and extended when you hash out the final details. I think value of Babel could be tremendously enhanced if '#+results ...' are revisited and redefined. So that not I sound too abstract, let us take an example. Remember the recent thread [1] where there was a request to automagically 'embed' the revision number of a document in an orgmode file? This is what emerged as a solution that the original poster was happy with. > ,---- > | * revision control > | The version of this file is > | src_emacs-lisp{(vc-working-revision (or (buffer-file-name) org-current-: export-file))}. > `---- IMHO, I believe there is an opportunity for improvement. What if the actual solution ended up like the following ... * 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. Time to get abstract ... As I see it, removing 'extra levels of indirection' as the 'results of source block' travel through org document more the Babel workflow would seemlessly integrate with org's world view. In some sense Babel would be more successful if it does it's offices under the hood and not really make it's presence felt to the person editing the document :-). Footnotes: [1] http://thread.gmane.org/gmane.emacs.orgmode/29690/focus=29792 [2] Jambunthan K.