From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [Babel] now understands org-mode lists Date: Thu, 18 Nov 2010 08:27:49 -0700 Message-ID: <877hga1wju.fsf@gmail.com> References: <87r5ejwlkf.fsf@gmail.com> <81tyjftqc4.fsf@gmail.com> <8162vvcv00.fsf@gmail.com> <818w0r4d1v.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=34622 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ6Ox-0000Wn-3U for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 10:27:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ6Ov-0002mG-GU for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 10:27:54 -0500 Received: from mail-qy0-f169.google.com ([209.85.216.169]:34952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ6Ov-0002m7-Cw for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 10:27:53 -0500 Received: by qyk31 with SMTP id 31so1419543qyk.0 for ; Thu, 18 Nov 2010 07:27:53 -0800 (PST) In-Reply-To: <818w0r4d1v.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 18 Nov 2010 07:18:28 +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: Jambunathan K Cc: Org Mode Hi Jambunathan, Jambunathan K writes: [...] > > To summarize, what I am really thinking is this: > > 1. Use C-c C-c (org-dwim) with a prefix modifier key that makes it > (org-custom-dwim). > 2. The custom dwim pops up an easy menu that is context dependent. For > example, for the list case it could offer a choice of numbering > styles - alphabetical, subsection etc. > 3. Make Babel recognize implicit arguments and results. So when on a > Orgmode list (or when the active region is a Ormode list), Babel > creates a virtual 'input' var that represents the textual list and > does 'replace-region' for the results block. So there is no more > '#+results' that the user sees in the text document > 4. The easy menu keys in (2) maps to 'library of babel' calls that > behave as in (3) which creates needed overlays. > 5. Make the exporters (specifically the ASCII exporter) to use overlays > to emit the custom-styled lists. > > The above idea is more or less along the lines that I exchanges with you > a few months back where I (tried) articulating the idea of Babel as 'a > text manipulator' of Orgmode entities like headlines etc. > Interesting, a couple of thoughts... - I think that your idea of a quick access menu for library of babel calls which converts the objects (table, list, etc...) under the point into an implicit argument to the code block could make lob functions much more accessible and easily usable. - I'm not so sure about the use of `replace-region' in (3) as I can imagine that there would be cases where you would rather perform some operation on the input data for pasting elsewhere in the document. - I can see how this would quickly lead to a desire for type hinting on library of babel code blocks, e.g. if my point in on a table I don't want to see all of this LOB functions which operate on lists. such type hinting could easily be implemented as another header argument - This would certainly be helped by the ability to pass un-named arguments to code blocks (something I've been meaning to implement anyways) I agree this is an interesting way to use Babel. Unfortunately I simply don't have the time to develop this myself, however if you want to start developing in this direction I'm happy to help in terms of answering questions and adding features on the babel side of the fence. Best -- Eric