From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:f42::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GLHSE8/gyGGNRAAAgWs5BA (envelope-from ) for ; Sun, 26 Dec 2021 22:38:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EHFkEM/gyGEs1wAAauVa8A (envelope-from ) for ; Sun, 26 Dec 2021 22:38:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EC834C6B6 for ; Sun, 26 Dec 2021 22:38:22 +0100 (CET) Received: from localhost ([::1]:57900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1bDi-00057s-66 for larch@yhetil.org; Sun, 26 Dec 2021 16:38:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1bDJ-00057e-Ej for emacs-orgmode@gnu.org; Sun, 26 Dec 2021 16:37:57 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:34749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1bDH-0007rj-LU for emacs-orgmode@gnu.org; Sun, 26 Dec 2021 16:37:57 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 757261C0002; Sun, 26 Dec 2021 21:37:52 +0000 (UTC) From: Nicolas Goaziou To: Jonas Bernoulli Subject: Re: [PATCH 1/2] ox-texinfo: Turn a description list item with "+" bullet into @itemx References: <87pmqhmvg1.fsf@bernoul.li> <20211218214038.9459-1-jonas@bernoul.li> <20211218214038.9459-2-jonas@bernoul.li> Date: Sun, 26 Dec 2021 22:37:50 +0100 In-Reply-To: <20211218214038.9459-2-jonas@bernoul.li> (Jonas Bernoulli's message of "Sat, 18 Dec 2021 22:40:37 +0100") Message-ID: <87wnjr9he9.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.70.183.197; envelope-from=mail@nicolasgoaziou.fr; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kyle@kyleam.com, emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640554703; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9OPK8Ou+hg4wVB8z7vCJk/5mVJnNBtludux6zwsLruo=; b=tKKJcLNUYFUUsDETDZZuDyXJjbCJ7T7ogX3fn49KgA7AitbC1U5h59htpMjs50bhc7TozL ONhVorG9Z8upY2ttAILxDDYKcfiifrtEsjRg9dJYa+N++OV0j10IAnXa9j913RWvlL+sPd TYaYzZjq+pfw6L7c4L7jS8kRIT5ePp+KqCg5I2EzLdnr046kIZcFo8KD4YU/nEB1gpkc1P CznD5BDsNBPD/30Z70gC2VGr1DvINPLtarTUW0Ooc5zkgv2f8t9pr6HAW2oZGeSjcQ+YRn FqlLdg2l/hGIJWk6ga7W/SqglLOIFZ0yvwGlI84utIn73ZLJKjiXFS28th+PJw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640554703; a=rsa-sha256; cv=none; b=pRDyf4g/po0zaBQSQcKlv0e1zk+hv2GJUILJth1Hb0xvkAlgN3tbY/tYQ7q1w6kASigOXh +qQ0zazOjVvYz0S1+g1zFop4a8Dho6dXPTT9+nx+mjP63+CxTCX6cuTfNbffbpoz1mncEV FR9E9O8QUpLU71/5Cx+/D5Om1NtehZDyWnBl2dJ3AWvgAgytMd8Pqk0XfRar38728h+p0V HhLjfVxmXB3C1pumbxoBt9SfjJMdy1mu21i856hucC3Ge87158Ea9PbN6ZM/UZfH5trfoo Y9dEx6m6vOSpXQwtqug2MSf/KVrExljcgiRiYs0C7nn533dmq/YFjewhe59K9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.47 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EC834C6B6 X-Spam-Score: -3.47 X-Migadu-Scanner: scn0.migadu.com X-TUID: gcNcLq71yqh/ Hello, Thanks. Some comments follow. Jonas Bernoulli writes: > +In description lists the used bullet is significant when exporting to > +Texinfo; when in doubt, then use =3D-=3D. An item that uses =3D+=3D ins= tead > +becomes a new entry in the first column of the table. The above > +output can also be produced with: >=20=20 > #+begin_example > -#+ATTR_TEXINFO: :enum A > -1. Alpha > -2. Bravo > -3. Charlie > +,#+attr_texinfo: :table-type vtable :indic asis > +- foo :: > ++ bar :: > + This is the common text for foo and bar. > #+end_example The above is fragile, because pressing on an item will "repair" the bullets. Therefore, you cannot support mixed bullets in the same list. > *** Tables in Texinfo export > diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el > index b0125894a..35862357d 100644 > --- a/lisp/ox-texinfo.el > +++ b/lisp/ox-texinfo.el > @@ -418,6 +418,11 @@ (defun org-texinfo--filter-section-blank-lines (head= line _backend _info) > "Filter controlling number of blank lines after a section." > (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" "\n\n" headline)) >=20=20 > +(defun org-texinfo--filter-parse-tree (tree backend info) > + "Normalize headlines and items." > + (org-texinfo--normalize-headlines tree backend info) > + (org-texinfo--normalize-items tree info)) Could you expound the docstring? Arguments are missing, and "normalize" is vague. > + (org-element-map tree 'plain-list > + (lambda (plain-list) > + (when (eq (org-element-property :type plain-list) 'descriptive) > + (let ((contents (org-element-contents plain-list))) > + (while (setq item (pop contents)) > + (let ((next-item (car contents))) > + (when (and next-item > + (equal (org-element-property :bullet next-item)= "+ ")) The above will fail if `org-list-two-spaces-after-bullet-regexp' is non-nil. You should compare the trimmed bullet with "+". Anyhow, relying on mixed bullets is not great=E2=80=A6 Regards, --=20 Nicolas Goaziou