From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UP44NxBOPmPT1QAAbAwnHQ (envelope-from ) for ; Thu, 06 Oct 2022 05:40:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4PdQNhBOPmNVRwAAG6o9tA (envelope-from ) for ; Thu, 06 Oct 2022 05:40:00 +0200 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 70E79E1B5 for ; Thu, 6 Oct 2022 05:40:00 +0200 (CEST) Received: from localhost ([::1]:60936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogHjr-0002P5-If for larch@yhetil.org; Wed, 05 Oct 2022 23:39:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogHiG-0002Kh-41 for emacs-orgmode@gnu.org; Wed, 05 Oct 2022 23:38:20 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:41982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogHiE-0002p6-7a for emacs-orgmode@gnu.org; Wed, 05 Oct 2022 23:38:19 -0400 Received: by mail-pf1-x430.google.com with SMTP id g28so895261pfk.8 for ; Wed, 05 Oct 2022 20:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=pQqnngV956wcrCWFjUrzGKj7/KzuTJ8r1FDDbZtwFe0=; b=iOlTyUlvrQAUiEQUG5txyYdpdUp5hlf2/gOlxm945tu6IfHxuhv9iNqYVrxg0yIsqP EgVhdfZaiSJ3JNDWZVNYYkPfbkT/Y5QaqPAN9Z7UUbivxgkUY+kyXuFHJ5ZNz0esHbKA sgy+KPJxareMkKGvfMyyiBYJV2i5RS0GBWB41AcQ8aoe2x+7OcTlOlg4+RePS+fC18OP AVBY1/pinXcboCPJeOod6iSRVwO2IS/IWXIANmLoTObN4SexY4rZJvFHmFaeXFWpVoxC yAbKJEWzXgFah7Ejk3QKR9lkKwvvGShF/Vc5BXFmcGZgWRpdzhZtRB/gajQgSzPoD4Rh yCjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=pQqnngV956wcrCWFjUrzGKj7/KzuTJ8r1FDDbZtwFe0=; b=gnIpl/ejmEgKy4D78BKFas6gUU9OzyGVx8PutFLmg/o5ZuVuHq9SQihKpHbr7C/WhL tYXoW0iEcQ9jCWH54a2JUnp5vW+O/kG8U0eamUqfgkOjEkh41aNxbMMiM3SmswAxW2wR hGVNeyVCLzBnGR5sOkPj8eR4pQY7RoQN/cCPM4pjLImeHicdYcndA0DEb5O+70A18eGG OqFrE95Wn3M1affdjo5sQoG3G1hKozseD2l6q18wXjLWyQGiGeCiVDZWff7gYh7jp/7X HWp4+PoKfdOEPg8fOGM0OfRw7jQLqMXgvU2XDFFAhpeo5a2VqG+SPPZcI0ZwS6cKQmc3 YKnA== X-Gm-Message-State: ACrzQf12SJcjkTrvhyK+pJnl8XoLD9hWDHkfbRWTzFtn+omnW5gp5AM0 mFuBAYUdKNT5M5iSy8ytod5K6UwnfJ/tX15C X-Google-Smtp-Source: AMsMyM492rD8Po4mn3nALZ4jDO8vCdBBLXStksq51FA8JwIutMQ+S4VlW1OgznYTrx0yEezhSqizDg== X-Received: by 2002:a63:8742:0:b0:45a:26d5:2292 with SMTP id i63-20020a638742000000b0045a26d52292mr2729290pge.294.1665027495491; Wed, 05 Oct 2022 20:38:15 -0700 (PDT) Received: from localhost ([1.83.154.214]) by smtp.gmail.com with ESMTPSA id n14-20020a170902d2ce00b001714c36a6e7sm11191975plc.284.2022.10.05.20.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 20:38:14 -0700 (PDT) From: Ihor Radchenko To: Rick Lupton Cc: "Y. E." Subject: Re: [HELP] Fwd: Org format as a new standard source format for GNU manuals In-Reply-To: <4f4f2b89-ee99-471f-8105-4c54fe1adfc1@app.fastmail.com> References: <87bkqx4jyg.fsf@localhost> <878rm02pc1.fsf@localhost> <87ill3st88.fsf@localhost> <87h70m252s.fsf@localhost> <87ill233z1.fsf@ucl.ac.uk> <87mtaez8do.fsf@localhost> <87v8p29w2v.fsf@posteo.net> <87tu4ly1ql.fsf@localhost> <87o7url4el.fsf@posteo.net> <4f4f2b89-ee99-471f-8105-4c54fe1adfc1@app.fastmail.com> Date: Thu, 06 Oct 2022 11:39:06 +0800 Message-ID: <87zge962p1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=yantar92@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , 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=1665027600; 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:dkim-signature; bh=pQqnngV956wcrCWFjUrzGKj7/KzuTJ8r1FDDbZtwFe0=; b=gjpq7gfEJDCqT522xvRVHdaIaGn3OQOrgYyXLJI2OlKxeKbSDquWL2I8QYaig9mM8hcDmG 2w2vntq242xWYNXBU14pRFxo9fU/v3qcKIYJ7DyVlqPcifG7bGOtWFk//H1zdTLdKuaave UP7MnYFDfZ2aoJHFcAJordT1u61Pb5hxCmGtijEbVLfwEZKy+Rxa5DHxh5zxpNg5RElnWG GDQth/SVIDSk8vWIUtHf6CwrXDD2PwquXY1cWc5p3ewfjKFU2oSgVhgC5epp8bFfz9FEu2 MVU5oiBXBXlfmx6OdpnPWmgP0Y/pv7VaOQzkghTDaxZlBKOaVlDR+WO2k1iFDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665027600; a=rsa-sha256; cv=none; b=ba0T8BdSRsG5Yu0btnpo2E+BQWqLxP6+Fcl37Vck/vnIq1Y4Pam2dAl9HqOdpLxFWeJUrl JWG0LgXdq5A5p1hqJ+2s/VK6XSkQxuFyUQlQvJxvQt5GdcMrZt2/qfQh99wKh7+gGuFCIp aT3yjLdkO2ckMbKEKXUMCtVLmgVKVaAL9d1IKfnEf2DojfZN6OOwswjuz+epvlTFaJWHwP 5+cycdtSUnJIxwZXWF8msUn4ToweKINd/E6kZcXOT+cLkAsJljh/jnW8sRhEvyCC9nmIoK 6f6K1EEjrENF6WnaIkdEggPL4Pjat9VxuCra65wLLfJUWrNARIoGEZ04SlI+Ig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iOlTyUlv; dmarc=pass (policy=none) header.from=gmail.com; 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: -5.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iOlTyUlv; dmarc=pass (policy=none) header.from=gmail.com; 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: 70E79E1B5 X-Spam-Score: -5.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: neY68z6YPJIZ "Rick Lupton" writes: > I wonder if you have seen Pollen=E2=80=99s approach to this? https://docs= .racket-lang.org/pollen/pollen-command-syntax.html Thanks for the interesting reference! After skimming through the syntax described in the link, I feel like most of the features are already present in Org syntax or being discussed here. > There are two separate ideas used there which seemed related to this disc= ussion. I=E2=80=99m not sure if they are useful in the org context.=20=20 > > 1. The use of a special character (=E2=97=8A by default) which introduces= a command/inline special block. I don=E2=80=99t know if this would be wort= h considering as an alternative to @ (which also seems reasonable) to avoid= ambiguity with other syntax. As the link above discusses it=E2=80=99s hard= er to type but there are solutions.=20 I do understand the idea behind =E2=97=8A, but it is the design decision we would need to make before creating Org syntax. At this point, we are not going to change the Org syntax concepts just for having the nice feature. There is no point to solve the escaping problem just for a single new Org syntax element and not changing the rest of the syntax.=20 So, I'd prefer to keep "@" or other symbol we already use in the existing Org elements/objects. For escaping @ inside, we already have zero-width, an alternative idea with special \-- entity, and we can introduce \atsymbol entity that exports and displays as "@". > 2. Making it easy to define custom functions that produce org syntax. A b= it like perhaps Max's suggestion to use source blocks, but instead of writi= ng AST-like structure directly in the document where you want it, you can c= all a previously defined function to build it. This is similar to org macro= s but I=E2=80=99m not sure if they are so flexible as a lisp function. Ther= e is also the option to choose between passing arguments as lisp (in [ ]) o= r as markup (in { }) We already have named code blocks to call arbitrary code in arbitrary programming language and produce arbitrary results, including Org markup. On export. I do not think that we should allow runtime markup calculations on-the-fly due to performance reasons. Also, Org macros do allow arbitrary elisp: As a special case, Org parses any replacement text starting with =E2=80=98(eval=E2=80=99 as an Emacs Lisp expression and evaluates it ac= cordingly. Within such templates, arguments become strings. Thus, the following macro #+MACRO: gnustamp (eval (concat "GNU/" (capitalize $1))) =20=20=20=20 turns =E2=80=98{{{gnustamp(linux)}}}=E2=80=99 into =E2=80=98GNU/Linux= =E2=80=99 during export. Max's idea about AST structure is just an extra fallback to produce really tricky cases. And since it is going to be an src block result, all the features for src blocks will apply, including calling arbitrary code (not just Elisp). I do not see this idea as being a part of normal usage, just really weird border cases. (At least, it is my understanding. Max may chime in with more clarifications). --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at