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 21:08:54 +0530	[thread overview]
Message-ID: <81k4mv7wq9.fsf@gmail.com> (raw)
In-Reply-To: <817hiwqk6c.fsf_-_@gmail.com> (Jambunathan K.'s message of "Wed, 08 Sep 2010 21:52:51 +0530")


> 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 <<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.

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.

  parent reply	other threads:[~2010-09-09 15:55 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 [this message]
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
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=81k4mv7wq9.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).