From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8LcTCMW4WmENGAEAgWs5BA (envelope-from ) for ; Mon, 04 Oct 2021 10:18:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UFq7A8W4WmFUAwAAB5/wlQ (envelope-from ) for ; Mon, 04 Oct 2021 08:18:13 +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 961D22AFDB for ; Mon, 4 Oct 2021 10:18:12 +0200 (CEST) Received: from localhost ([::1]:42886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXJAp-0005O0-Op for larch@yhetil.org; Mon, 04 Oct 2021 04:18:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXIvT-0003JG-8V for emacs-orgmode@gnu.org; Mon, 04 Oct 2021 04:02:21 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXIvR-0007Qz-Lt for emacs-orgmode@gnu.org; Mon, 04 Oct 2021 04:02:19 -0400 Received: by mail-wr1-x42b.google.com with SMTP id t8so29277830wri.1 for ; Mon, 04 Oct 2021 01:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vu9WVzGAWTlJfYGcTLzBMnClSgvYJmZ3Mf5FOij+g+o=; b=Ykj1JFSA5ox091iJeNd2nNq7+xV7y+JpY0/Fm8OtZoSsjlpss6GUtQALuDmFhfbvHP 4+zL/7+A8QM7exDr4lCAvpVn3Keg4EmXZrVsnVQxZM/CA1zHNgmc2S7BsKazz7DNEDgt mnE6zVAuZUVs+bf7cI7ET2W+LU3RgzYRZJ4Nq7bVpYmW8Pbrl+AS3+aGHGO3hO9cE5uq 9BY6ENT92y7TcWWvw3xi6OKyUu3g2esNkCAg5WAxVKoJoBKzlUgWUeHciIbPyIrFti/+ HCPwyxPTCNRiuZ46SwXXhJfKm2hn9KLem7UpLuRV2p9x9e0CQ5mTiJyOMP3nDFxPWIaw Q/Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vu9WVzGAWTlJfYGcTLzBMnClSgvYJmZ3Mf5FOij+g+o=; b=ApDr2u7IDA/wl0Ad07+pNe+1nrCwS0uR14E8mW7l5kqJ28IJ9jYozLaXSRRsCtNBTS oCWzzck283iHIE02odQIiNRuh0tbxc4QOlB0nMGLLbNSxb8Rde1EnDmCnEgxtYRJrlcK pEfhnv0IWaYAUC2BnJNvFX9KmzwwERo53GFll3otZ2/oEXc9D94AZ8Y/7z4/66oQja9H hJB1FkkwSeCKwdTF0O8JX6t34MhL9TwK2Tbl26EGDGMDlS5B+r6GMIoAixJ5jbDnb/U+ zkyGZprBfHX8bADkBWxtbfUNuVOJqrVLKcdiHAKBzY/rFGSi9vNpSgpu8EMfTuzvjUhF JdIA== X-Gm-Message-State: AOAM531Xpcu1PhkbwZlzD25rbOyRKW015syqebztZHymTLC1SmYoyqTr 3O4cnKxmkOnOaF3y0eRqCYMOjmjaTdXXhqmpPfs= X-Google-Smtp-Source: ABdhPJxtmwL7AUFnEz7hQTS4EOHM3/qo7CE1//bUun7giz84w7VaMDTce2Khe5U1vdR9Jn2H7mTlG4gR7KT8oPZ9g/g= X-Received: by 2002:a5d:6c69:: with SMTP id r9mr6036704wrz.280.1633334536028; Mon, 04 Oct 2021 01:02:16 -0700 (PDT) MIME-Version: 1.0 References: <87h7ee5q8u.fsf@gmail.com> <87o88mqd6o.fsf@localhost> <87a6jpcnwe.fsf@localhost> In-Reply-To: <87a6jpcnwe.fsf@localhost> From: Tom Gillespie Date: Mon, 4 Oct 2021 01:02:04 -0700 Message-ID: Subject: Re: Org lint and named source blocks To: Ihor Radchenko Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dominik Schrempf , Emacs Org Mode Mailing List Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633335492; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Vu9WVzGAWTlJfYGcTLzBMnClSgvYJmZ3Mf5FOij+g+o=; b=jhOS2OP6tvv0am98AEou3WeOjZCev/IbweoXxKz3SpJpomRAwjg6vCLyY7aTLx725Oy0m4 /s4TgZj2gDH2P0mT5PJDMGVZPwywA2qiBt1kTW3T0hZeRrxstTbAoGnS9rRqT+eUilD6qZ XfAXQz8GsvgTqox8KdzoLgFr0cVWuYZZM5dnYV8fco4vA9pZJKOw6N2jiqAIn97fwOxFM+ bSEgvinUQ58Z2QNBxgAndbtK46l4qcyjYybhNbovboV1dfEtLDqJc8FiHlsnuAO+pG8NRu iBi9NRbzgHlP+Jp0DVyERqsW+kZt7ON7bRSdDrIeHDzGwO/dAmuoZp6H0K9Y+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633335492; a=rsa-sha256; cv=none; b=TPSWqW+4QNIbeRR455iA0C6XGB7PXCYa/FqToWOWsPbJK6s2LD5Q2crLitwHylfflVh2mk L20rejpaJQ0XN/S6lcAlY/6RCWuyj6VObobQhbH3vwab7QpVNlYKhS61gBs1s7eLkP3ERU JZ3vYYiq4oPj/l8ovE9+zZl7KSp3qDLdrXBW1c9Wp9OHfZZOG9RcbFZdk2Sn2qbQ/w54AI 86KxFiKAyV7+YLlPiuMlWDV2QJOfYjg+XhPKpmzb2hIk//r21cPh+s1ZuVGDPrttIVcU3X 1XS6g0415CsqFeXHisxV0lABbd35BCpWwq8VeP+MXqtkzWyuMz/rJLLys39H+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ykj1JFSA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ykj1JFSA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 961D22AFDB X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: iRCMAy/4VVBC > By the way, wouldn't it be better to use tree-sitter rather than > something else for the format grammar? Not really since we are going to need more than one implementation using a parser generator to avoid baking implementation specific details into the spec by accident. This is true for more than just the grammar as well. The complexity of tokenization, parsing, expanding, etc, for Org means that we are going to need multiple implementations to nail the behavior for any formal spec. That said, we definitely want a TS implementation at some point. See https://github.com/tgbugs/laundry/issues/1 for a recent discussion about ways forward. The implementation I'm working on should translate to TS without too much work since both brag and tree sitter describe LR variants. There may be some subtle differences, but nothing fundamental. The issue for me is that I don't have the bandwidth to get started with a full tree sitter implementation, especially because it is going to need a custom scanner, and because you're effectively on your own when it comes to reconstructing the output of the AST into the actual internal representation of an Org file. I also have no idea how to deal with nested parsers in tree sitter. I have some ideas about how it might be done, but nothing concrete (see the linked issue for more on that). Best, Tom