From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QKTIFtl+zWGJZAEAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 10:41:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UFAtFNl+zWEZLQEA9RJhRA (envelope-from ) for ; Thu, 30 Dec 2021 10:41:45 +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 E64A32B139 for ; Thu, 30 Dec 2021 10:41:44 +0100 (CET) Received: from localhost ([::1]:35892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2rwO-0005c8-3u for larch@yhetil.org; Thu, 30 Dec 2021 04:41:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2rvX-0005Z2-Mh for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 04:40:51 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2rvU-0001Uq-Uw for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 04:40:51 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id CB910E0007; Thu, 30 Dec 2021 09:40:45 +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> <87wnjr9he9.fsf@nicolasgoaziou.fr> <87zgol7wkz.fsf@bernoul.li> Date: Thu, 30 Dec 2021 10:40:44 +0100 In-Reply-To: <87zgol7wkz.fsf@bernoul.li> (Jonas Bernoulli's message of "Mon, 27 Dec 2021 19:05:00 +0100") Message-ID: <87ee5u77mr.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.196; envelope-from=mail@nicolasgoaziou.fr; helo=relay4-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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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=1640857305; 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=yD/IV19l8ZsvtLQpvfP+ESJE+/UpHVf6s0Hlt2g9CFo=; b=EsBRFXpa/ziCPlYOHDe3grUPcM6QH8wmUtmeG/uu453fGggcCaktz4vrOMZjSHY53JCXWi YVUrr9m9C+4MKI68fGomJIdjc+Vv9RWTHqtax239V3SIBKCcEyvDK0VfLdaCCyARHReq/V jOLZWdVSWa56TeDHGKia+yJ4qMCZ73HcsjTpWBT4BILNMl6ZgHU+6p70s0LBwlMp/tCjTr K/r9mNShRX1mvdxvnyt3yEGCj0yw/gT1OBj5qETjRqMOUA7OS/ytBhIYfCJDFsva6g8nA3 0cPM+VP/qolZy0V+ifmKzgsZ9IcuolcqzDBWQt/QMD0MeNHJrnWSEUIRnj8FqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640857305; a=rsa-sha256; cv=none; b=tvA+PYqRlVdkGdc/DjpgFjvRwmvbaQgE9xGf4QXByFyzViUFUx7bBYEtMEgpq8uYJQ7zJx TLf6tlLfAB9CoZfAIpjAwjfzCFi1NKUwn5vVFlK7w3NDpe2eQQolB+hoJX5ar/QJUKW/YX T5PZls3Uq8uTaCNYoUrVDsvSeI9fBT/TRh3UmOOSgZJeinLRUCVpOVzvRDWePZ5eoRf7JK boKLcE+AF0p9/dV5mYdnVjICrGHlYUfIT4hfz1+RwLcqCHFMNXknjwfKfnhyXzpvjY/9Jh D/9rYSA6X9Y7BS3IrWrcYjSMOYJa5WbhpXsGeJ9TnqALwPwaZ5aYoEkbRN1+oQ== 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.87 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: E64A32B139 X-Spam-Score: -3.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4P+AAsgA0kSw Hello, Jonas Bernoulli writes: > I vaguely remember having run into this feature before when using Org to > record a pros and cons list. As a maintainer I don't like this question > but; could this feature be made optional? (Of course one could use tags > to indicate whether an item is a pro or cons, but for such a simple use- > case that seems more work than necessary and less immediately > obvious.) You can also make two lists. I don't think we should provide "pros ans cons list", because it has implications outside export. > This bothered me a bit too when writing it but at the same time > it seemed like overkill to replicate the docstrings of the called > functions. How do you feel about using a hook instead? > > (defvar org-texinfo--filter-parse-tree-functions > '(org-texinfo--normalize-headlines > org-texinfo--normalize-items) > "List of functions the `texinfo' back-end applies to the parsed tree. > Each filter is called with three arguments: the parse tree, as > returned by `org-element-parse-buffer', the back-end, as > a symbol, and the communication channel, as a plist. It must > return the modified parse tree to transcode.") Sure. > Do you prefer to add the hook functions as done above or should each one > be added individually using add-hook? `add-hook' is more for users, I think. > Done. Is this okay?: > > (when (and next-item > (string-prefix-p > "+" > (org-element-property :bullet next-item))) > > Or should the line-breaks go elsewhere? The line breaks do not matter much but it may fail if (org-element-property :bullet next-item) returns nil. >> Anyhow, relying on mixed bullets is not great=E2=80=A6 > > The alternative isn't great either. > > For example: > > - Key: C-c C-w (forge-browse-TYPE) :: > + Key: C-c C-w (forge-browse-dwim) :: > + Key: N b I (forge-browse-issues) :: > + Key: N b P (forge-browse-pullreqs) :: > + Key: N b t (forge-browse-topic) :: > + Key: N b i (forge-browse-issue) :: > + Key: N b p (forge-browse-pullreq) :: > > These commands visit the topic, issue(s), pull-request(s), post, > branch, commit, or remote at point in a browser. ... > > vs. > > - Key: C-c C-w (forge-browse-TYPE), C-c C-w (forge-browse-dwim), N b I (f= orge-browse-issues), N b P (forge-browse-pullreqs), N b t (forge-browse-top= ic), N b i (forge-browse-issue), N b p (forge-browse-pullreq) :: > > These commands visit the topic, issue(s), pull-request(s), post, > branch, commit, or remote at point in a browser. ... > > I am sure I am gonna make mistakes when using the latter approach. True, but OTOH, the first option is not really possible. However, there are still alternatives. For example, you could check blank lines between items: - key: a :: - key: b :: - key: c :: - key: d :: I suggest to require a special attribute before doing so, e.g., #+attr_texinfo: :compact t - key: a :: - key: b :: - key: c :: - key: d :: Another option would be to merge consecutive lists with such an attribute, for the same result: #+attr_texinfo: :compact t - key: a :: - key: b :: #+attr_texinfo: :compact t - key: c :: - key: d :: - This is a regular list since it does not have :compact attribute. IIRC, I did an experiment like this one when introducing matrices in LaTeX export. Regards, --=20 Nicolas Goaziou