From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Feature request: lists with letters Date: Mon, 13 Feb 2017 21:39:29 +0100 Message-ID: <874lzxlta6.fsf@nicolasgoaziou.fr> References: <1622a63fda844eb1aa553fdcd19a5758@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87d1ezwiq0.fsf@pinto.chemeng.ucl.ac.uk> <87efzfbd47.fsf@posteo.de> <874m0772pn.fsf@gmx.us> <87mvdzm6o7.fsf@posteo.de> <87y3xfn243.fsf@gmx.us> <87r336mhvy.fsf@posteo.de> <87mvdtr098.fsf@nicolasgoaziou.fr> <8760kepdml.fsf@gmx.us> <87shnip5he.fsf@nicolasgoaziou.fr> <87vaseni84.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdNPO-0005XW-PL for emacs-orgmode@gnu.org; Mon, 13 Feb 2017 15:39:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdNPK-0007vi-0K for emacs-orgmode@gnu.org; Mon, 13 Feb 2017 15:39:38 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:39287) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cdNPJ-0007vR-OM for emacs-orgmode@gnu.org; Mon, 13 Feb 2017 15:39:33 -0500 In-Reply-To: <87vaseni84.fsf@gmx.us> (rasmus@gmx.us's message of "Mon, 13 Feb 2017 17:55:23 +0100") 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" To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus writes: > Here's a quick attempt. Do you want me to push it? Thank you. Some minor comments below. Feel free to push whenever you think this is good enough. > +(defconst org-html-plain-list-type > + '(ordered "ol" unordered "ul" descriptive "dl") > + "Plist of Org and html list types.") I think this is not needed. We should merge `org-html-begin-plain-list' and `org-html-end-plain-list' into `org-html-plain-list'. There is no reason to split it. As a consequence, we can compute "ol", "ul" or "dl" at the beginning of `org-html-plain-list' and be done with it. > + (let* ((html-type (plist-get org-html-plain-list-type type)) > + (html-class (format "org-%s" html-type))) > + (format "<%s %s>" > + html-type > + (org-html--make-attribute-string > + (plist-put attributes :class > + (org-trim > + (mapconcat 'identity #'identity > + (list html-class (plist-get attributes :class)) > + " "))))))) > > (defun org-html-end-plain-list (type) > "Insert the end of the HTML list depending on TYPE." > - (pcase type > - (`ordered "") > - (`unordered "") > - (`descriptive ""))) > + (format "" (plist-get org-html-plain-list-type type))) See. There is no need to make this one-liner a separate function, IMO. Regards, -- Nicolas Goaziou