From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] [PATCH] [babel] read description lists as lists of lists Date: Sat, 20 Sep 2014 13:52:39 +0200 Message-ID: <87ha02a4qg.fsf@nicolasgoaziou.fr> References: <87ha03qv19.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVJD3-0000L4-Nr for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 07:52:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVJCt-0001Tu-IP for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 07:52:13 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:38695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVJCt-0001NL-DB for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 07:52:03 -0400 Received: from mfilter27-d.gandi.net (mfilter27-d.gandi.net [217.70.178.155]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id F0B92FB89F for ; Sat, 20 Sep 2014 13:51:56 +0200 (CEST) Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter27-d.gandi.net (mfilter27-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id MaE3bdtiY4P5 for ; Sat, 20 Sep 2014 13:51:55 +0200 (CEST) Received: from selenimh (unknown [91.224.148.150]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 2ED61FB8A1 for ; Sat, 20 Sep 2014 13:51:55 +0200 (CEST) In-Reply-To: <87ha03qv19.fsf@gmail.com> (Aaron Ecay's message of "Fri, 19 Sep 2014 15:17:54 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode Hello, Aaron Ecay writes: > The attached patch makes babel read description lists as lists of the > following format: (("term" "description") ...). The present default is > to simply read in the text of each list item, yielding: > ("term :: description" ...). Thank you. > Of course, it=E2=80=99s possible to interconvert between the two formats,= but I > think the greater structure of this proposal makes things easier for > babel authors. (Another way of thinking of the proposal is that it > treats description lists like two-column tables.) > > What do people think? The problem I see here is that you're introducing yet another internal representation for lists (along with element's and org-list-parse-list's). Worse, it can only be discovered when reading the docstring of a Babel internal function and will only benefit to Babel. If this new internal representation is better than current one, by all means, improve `org-list-parse-list', and document it in (info "(org) Radio lists") This is more work, but, IMO, it is also the only sane way to proceed. > +THE result is a list of strings \(the list items), unless the You only need to escape parenthesis at the beginning of a line. > + (mapcar (lambda (el) > + (let ((s (split-string el " :: "))) > + (list (nth 0 s) (mapconcat #'identity (cdr s) " :: ")))) This is really awkward. You can use a regexp to extract the tag. Regards, --=20 Nicolas Goaziou