From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +BI1IUznq2HgHgAAgWs5BA (envelope-from ) for ; Sat, 04 Dec 2021 23:10:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gFE6HEznq2HcCgAA1q6Kng (envelope-from ) for ; Sat, 04 Dec 2021 22:10:20 +0000 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 EACBF4CF3 for ; Sat, 4 Dec 2021 23:10:19 +0100 (CET) Received: from localhost ([::1]:41318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtdEY-0000bd-BG for larch@yhetil.org; Sat, 04 Dec 2021 17:10:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtdDy-0000b0-ET for emacs-orgmode@gnu.org; Sat, 04 Dec 2021 17:09:42 -0500 Received: from [2a00:1450:4864:20::22f] (port=34342 helo=mail-lj1-x22f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtdDu-0004Ex-Bx for emacs-orgmode@gnu.org; Sat, 04 Dec 2021 17:09:42 -0500 Received: by mail-lj1-x22f.google.com with SMTP id k23so13367940lje.1 for ; Sat, 04 Dec 2021 14:09:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=MWkitrQdsC7BWyUFZzmr2fU+XYcZwA1oRf7vnfqe5SE=; b=HAlwzaK67WplhT2g7RmLLhUsYXXGnyvfWeBZ6DTvIMCGa2Q9Py4OUw7syqwvmc2T49 K5vN57gaqubqb0vpbIw5T/7+sj1I1fDVXtKOisABHcW1FptpTjmUIOGvsK9f23EwMayy UuN5GorvGESSqL+J5Gc+CuOsetA5bMudeggkXQCKBvk98QM4EdlCuLsH1DT0rbAjpnTF pCgSCKPpF9IEyfF91WUdgvPDcCjyB6YOBM9AflvSiAeGF6GGnEnCTLIE+51wQHtwOUZ/ 3yTbbAmFAOGw/D/4+6N/8dC954rKOTIjRdrsiJWH6i9Kie+Elle8CvUT34eMr+1jNGLD 0DKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MWkitrQdsC7BWyUFZzmr2fU+XYcZwA1oRf7vnfqe5SE=; b=BzchYLwPPd3i3w4Lpsuz0pZV/Hxa0LrGMfNgVWGZuu9+nBhCGbcZyUR5EHr7cvBgjr gkKSlFjl9hoJyyTap4La3YpQ+QIEByvcMGGbmBkZyK9m9kFVy+beayLx+lseOlDaMVo/ UMDQiWipokT0FgKQrv0HWPWjhAS7mkY7Ivi0tvXfsEXna2pjIdYSwRQYiSAPcMcQoRZG Dc0ensd8gf5/ZziZlxADvJ4ymAgJdJvItMQwbuLEfPxkkW/XQcAqUMk4v14LAdxJpO1m TL8yhPvl7qWTe30txvAbe0E3wPLgvOPl5BXM5xGbPuXndxGyHZWw4dJu1okvqZ07KbbB T0SA== X-Gm-Message-State: AOAM533qJrVqSDKJbGHyg++WCW3t5wHH6wqMsvtMhEC8RoMqeBAmctUB LS4kuvsQii3azXeRCEGXtPbcSZDsjH6CklsL3h8+7e3spicK2w== X-Google-Smtp-Source: ABdhPJxpFvNUDDjJcXtLJnbbFrBQpJ8UPTVuSt+GzvY1ZRYZzhf9s4K+iU3tqTw/uQ16Xb7qpqAbvStOrTx5UOBJUqA= X-Received: by 2002:a2e:b816:: with SMTP id u22mr27133602ljo.51.1638655775767; Sat, 04 Dec 2021 14:09:35 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab3:1912:0:0:0:0:0 with HTTP; Sat, 4 Dec 2021 14:09:34 -0800 (PST) From: Samuel Wales Date: Sat, 4 Dec 2021 15:09:34 -0700 Message-ID: Subject: [fyi] extensible syntax, syntax features, parsing risk To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::22f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=samologist@gmail.com; helo=mail-lj1-x22f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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=1638655820; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MWkitrQdsC7BWyUFZzmr2fU+XYcZwA1oRf7vnfqe5SE=; b=CN6gy8JplgYqBiFufi+HEtEoQsmI6M4/ESCLe/6L7zkpQpSo+qukR7KeZCEj6deB8D10xq tCJdlLPkoQ44f0STQLgfx9zSeJ2iFv6SYBvwy5xOv8EgIQmx6tZLB0ktr8cbNKH+IzDHNy 93y+Q82VeR4mWMXXhEcDoDUb31rEPb6ydJgmbc2sYhg0ssQvDfUd6HEvxK4Por3g75CKEx 5EChj86OfBLRxzlCGbluaBL+OoZS6LO59C1KpNbA+7W7SiprKqlh4OCX9jMCIBZq4h8DAC B0DYjxqdKQ1Cqv7eiCVwxZXNHrF3nC/HSd+M6VsmtzpX0MOmdccb437NUnUT9w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638655820; a=rsa-sha256; cv=none; b=I7nJ0JlK9tvsZyCiwu/h76QdXYsQpsBs3ZJtup+Ou5qelGwOVRlOrgQ/GY4kUTP3v61Jn1 qGhXvj8X4ZNjZ9Kn6tLU8qEP51zaTsp5xibVr5bmaWaj3zelrLwSUIcvSYxdPnlhV6WHTM PDPQO6Sc2kUAMrsBHg2ekdMaZSQQxKJu9XSOpPDKxiPVmqQ2XEvJBMSMXd8pLPTF8elrZC NjK0E/5HlboQvp3Sxvr5kG8bQZUU3o/BInrXPOtuqHc0eyTznjq7G+TL29TeSwpFEGxlPk z3vS96qwrRlQwAbq55g9WOC8N3d6pZjIsSoHQerpTxELKh125dfV9Lq2OW+o+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HAlwzaK6; 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: -4.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HAlwzaK6; 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: EACBF4CF3 X-Spam-Score: -4.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: Lf80uBC4jEbh the quoted post below, which had message id 20524da70901041233g105f372fv175a47dc9884fa43@mail.gmail.com , starts a thread relevant to the current discussion of syntax, at least historically, maybe practically. could not find it online. there were succeeding threads with examples and other stuff for id markers and graph-theoretic things and other examples, where you as user could always use a cl-like syntax [i.e. something like "$[functionality-name arg :keyword arg]"]. my main concern was the proliferation of syntax, and the risks of that [e.g. parsing] and wanting the ability of factoring of syntax features. display, parsing and so on would be shared [factored] among all the different such features; org would always handle that the same. thus as a user even, you could add some new feature in lisp, and write it in org using this syntax. it would already work. i have more in notes. idk if it is still relevant, but i have included the thread starter for the earliest thread [carsten/myself]. On 1/4/09, Samuel Wales wrote: > A general idea, which might or might not be useful. > > There are occasionally questions about syntax, like this: > > Also, I'm afraid definition matching regexp won't play > nicely with text indentation, ... -- Paul > > Or this: > > What would be safer? -- Carsten > > I like the footnote implementation, so this is for future > features, not necessarily footnotes. > > One issue when implementing new syntax (or changing existing > syntax or cleaning up code) is parsing risk, which I will > define as the risk that the syntax and the regexp or > matching code: > > 1) conflicts with user text > 2) conflicts with existing features > 3) will be hard to maintain > 4) constrains future features by making them conflict > syntactically > 5) makes you run out of syntax to use in the future > 6) will require complicated regexps > 7) doesn't readily handle stuff you might want in the > future, like being combined with another feature > 8) will be hard to quote, escape, comment, *boldify*, etc. > 9) doesn't handle nestability, print-readability, > pretty-printability, syntax coloring, etc. > 10) will be inefficient when called in a loop > 11) isn't factored out > 12) etc. > > For example, one of the many reasons for using org-IDs (:)) > in the conversation manager (as proposed) is that there are > already functions to parse org-IDs, so a new syntax is not > necessary and therefore parsing risk is minimized. > > In case parsing risk is a concern when adding a new feature > to org, here is one idea: have a generic syntax that is > extensible with keywords. > > The idea is to have a bracketing syntax with a reserved > keyword as the first element that says what you are doing. > > To use footnotes as an example (this is not a suggestion to > change footnote syntax, just an example that can be used for > future syntax): > > You might use something like "here is some text to be > footnoted $[fn apple]" to specify the footnote link, and > "$[fn-target apples are delicious]" to specify the target. > > The general point I want to make is that once such a syntax > is decided on, many future features are possible without > introducing parsing risk. > > For example, you can implement a new feature as > "$[my-new-feature ...]". Then there is no parsing risk, > even though you have just added a new feature. > > For modifications of features, you can use keywords: > "$[my-new-feature ... :myparameter ...]". These are easily > parsed by standard functions for parsing lists. > > You can develop ways to boldify, quote, nest, prettily > print, etc. this syntax, and those ways will work well with > all future features that use it. > > Of course, the dollar sign and brackets are not the only > possibility; it could be percent sign and parentheses, for > example. > > You will not be starting from scratch. Lisp has already > worked out many of these issues. > > I will leave it to those who write massive amounts of org > code to decide whether an extensible syntax might be useful > to reduce parsing risk for future features. > > But I thought that I would propose the idea in case it is of > interest. > > -- > For personal gain, myalgic encephalomyelitis denialists are knowingly > causing further suffering and death by grossly corrupting science. Do > you care about the world? > http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com