From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: [Babel] now understands org-mode lists Date: Thu, 18 Nov 2010 07:18:28 +0530 Message-ID: <818w0r4d1v.fsf@gmail.com> References: <87r5ejwlkf.fsf@gmail.com> <81tyjftqc4.fsf@gmail.com> <8162vvcv00.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=45663 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PItcP-0004Dm-AI for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 20:48:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PItcO-0002MF-7S for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 20:48:57 -0500 Received: from mail-pw0-f41.google.com ([209.85.160.41]:61066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PItcO-0002MB-0y for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 20:48:56 -0500 Received: by pwi6 with SMTP id 6so514491pwi.0 for ; Wed, 17 Nov 2010 17:48:55 -0800 (PST) In-Reply-To: <8162vvcv00.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 18 Nov 2010 06:23:35 +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: Org Mode > Let's say one wants to number the lists using prime numbers. So one > could have two lists. > > # list1 (may be generated programmatically) > > 1. 2 > 2. 3 > 3. 5 > 4. 7 > 5. 11 > 6. 13 > > > # list2 (user-typed) > 1. Carsten > 2. Bastien > 3. Eric Schulte > 4. Dan Davison > 5. Eric S Faga > 6. Samuel Wales > > and juxtapose them together to get a custom numbering as follows > > 2. Carsten > 3. Bastien > 5. Eric Schulte > 7. Dan Davison > 11. Eric S Faga > 13. Samuel Wales May be the juxtaposition happens as overlays. So basically the custom bullets (2, 3, 5, 7, 11, 13 etc) are overlays over 1, 2, 3, 4, 5, 6 etc so that Org still recognize them as lists. Apologies for being so gross. 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. Jambunathan K. > > All this with a C-c C-c on list2. > > What this example does is essentially relate a 'list of styles' to a > 'list of text elements' and create a 'custom-styled list'. > > Jambunathan K. > >> Jambunathan K. >> >>> >>> This is just a quick first pass at this functionality, there are still >>> some unanswered questions, such as if and how code blocks should >>> differentiate between ordered and unordered lists (ordered get an index >>> for each item?), how nested lists should be represented etc... >>> >>> Best -- Eric >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode