From: "Eric Schulte" <firstname.lastname@example.org>
To: Jambunathan K <email@example.com>
Cc: Org Mode <firstname.lastname@example.org>
Subject: Re: [Babel] now understands org-mode lists
Date: Wed, 17 Nov 2010 18:20:23 -0700 [thread overview]
Message-ID: <email@example.com> (raw)
Jambunathan K <firstname.lastname@example.org> writes:
> Jambunathan K <email@example.com> writes:
>> "Eric Schulte" <firstname.lastname@example.org> writes:
>>> I've just pushed up a small commit (including minimal documentation)
>>> which teaches code blocks how to read and write Org-mode lists. The
>>> following example should demonstrate the new behavior.
>>> #+results: a-list
>>> - org-mode
>>> - and
>>> - babel
>>> #+source: a-list
>>> #+begin_src emacs-lisp :var lst=a-list :results list
>>> (reverse lst)
>> Why not call the underlying type an 'orglist'. One can for example think
>> of orgpropeties etc etc.
>> Btw, for the sake of illustration, how would one convert a numbered list
>> to an alphabetical list or an unordered list. Convert some thing like
>> 1. One
>> 1. OneOne
>> 3. Two
>> 4. Three
>> - One
>> - One
>> - Two
>> - Three
>> 1. One
>> 1.1 OneOne
>> 2. Two
>> 3. Three
>> C-c C-c on a list currently renumbers the list which I find quite
>> useful. May be there is a way to 'rebind' it so that it not only
>> renumbers but renumbers with a different style (that the user is
>> comfortable with). Think 'replace-region' for example.
> Let's say one wants to number the lists using prime numbers.
is this possible with normal Org-mode lists? I thought that numbered
lists automatically re-numbered themselves.
> 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
This seems like a problem more suited to tables. Lists are inherently
one dimensional and the problem you pose is inherently two dimensional.
> 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'.
I see what you're getting at, but rather than develop towards the most
complex conceivable use-case I prefer to keep things simple, only
introducing complexity when it seems "natural" and generally useful. I
find that taking such a stingy approach to development tends to result
in simpler more maintainable code.
> 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
next prev parent reply other threads:[~2010-11-18 1:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 23:57 [Babel] now understands org-mode lists Eric Schulte
2010-11-18 0:42 ` Jambunathan K
2010-11-18 0:53 ` Jambunathan K
2010-11-18 1:20 ` Eric Schulte [this message]
2010-11-18 12:43 ` Nicolas Goaziou
2010-11-18 1:48 ` Jambunathan K
2010-11-18 15:27 ` Eric Schulte
2010-11-18 1:14 ` Eric Schulte
2010-11-18 2:17 ` Jambunathan K
2010-11-18 15:30 ` Eric Schulte
2010-11-18 15:55 ` Nicolas Goaziou
2010-11-18 16:34 ` Eric Schulte
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).