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 ms5.migadu.com with LMTPS id NgifDrdmOmMqDgAAbAwnHQ (envelope-from ) for ; Mon, 03 Oct 2022 06:36:07 +0200 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 EHS0DbdmOmMqOAAA9RJhRA (envelope-from ) for ; Mon, 03 Oct 2022 06:36:07 +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 DE7671768A for ; Mon, 3 Oct 2022 06:36:06 +0200 (CEST) Received: from localhost ([::1]:45604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofDBV-0004en-IA for larch@yhetil.org; Mon, 03 Oct 2022 00:36:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofDAy-0004eZ-Vg for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 00:35:32 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:35586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofDAx-0000vg-2v for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 00:35:32 -0400 Received: by mail-pl1-x62f.google.com with SMTP id h10so5961988plb.2 for ; Sun, 02 Oct 2022 21:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=1oIAkUpl1F9AUyt5ZJXLP5QlKRLpTV3O4gJIuHy8rn0=; b=B523bECG6oewuihbq0Xc9XAEvCgpsWlfIlY8SjV4BdWuElv3IlXnHEMGfCjusQFVvK d01eJO+yYZkpCQdJJEnv5lnthXH6HcwkrR5SPZHlYv9eFoi8xqEcWx/nSdRxAdc9Ec+t zew7fjUHF6zWxhCCkpTVOQ4G+oeg1+RYWSuwHfH5DCla5d/UKRDw66PbVvlhmiRo4S6z xZGjXUS3yHbpA7oJ82OAYOlhwNNnj2KwXqis1KGDpTjhPdC3Me/rmU0/zQTsF/4kHQMu 0wD36rvvG85eViP/c9SeNsW8dVp31KayGIkKeSlPQnYlCYF4qh0gznOQOTpNaHyx8/2p Diig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=1oIAkUpl1F9AUyt5ZJXLP5QlKRLpTV3O4gJIuHy8rn0=; b=2Gu8FedVYQX4Qjl/uMaMKuaxGKYbYfVwuw7e1zbAnI0dfZXENhf3MUgLQM3KlUrlXw 01GaM7aIyqZTQwcnCq5h4MU+4ILQxvhuLuh0ECMlp+NFr6TBtG4BXxtS2HdZ6ijVPhHn JVMroLnylY38ZyHG7y4G8LHTqPWiUFOGZTiJXXyERSdsnAma6nRto9xQVObg5kbitMUg YHel4+MjJw/rtKZ/OoZLuWhT4nE8sBmuTSIMycLQ1+IW/GA+qqA3W1UHYUuPvjuyVzih EqzcItiTxP1JceCnQMpBnJar3UHQZa5TgWCFoTf2fzRX7NlU77I5LBokcJVB/ZelTOcy dRag== X-Gm-Message-State: ACrzQf0ov/LV1J7ZEc/2VxLYAAaJRZcAo9llihX0TSPk9gSZwnjH4Ys6 o0c+GuZX4yXO0GUk4dY+nAs= X-Google-Smtp-Source: AMsMyM7fiRNkiMBMT/MvT69ZV53hsADu2hsCRjiJhJbXR3+GhoNXcdRoSZ7ddOqRVo3zvXoPi+RnNA== X-Received: by 2002:a17:90b:4b03:b0:202:eab3:e174 with SMTP id lx3-20020a17090b4b0300b00202eab3e174mr9986414pjb.12.1664771729478; Sun, 02 Oct 2022 21:35:29 -0700 (PDT) Received: from localhost ([1.83.154.214]) by smtp.gmail.com with ESMTPSA id c135-20020a624e8d000000b0054223a0185asm6235255pfb.161.2022.10.02.21.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Oct 2022 21:35:28 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [HELP] Fwd: Org format as a new standard source format for GNU manuals In-Reply-To: References: <87bkqx4jyg.fsf@localhost> <878rm02pc1.fsf@localhost> <87ill3st88.fsf@localhost> <87h70m252s.fsf@localhost> Date: Mon, 03 Oct 2022 12:36:20 +0800 Message-ID: <87r0zpy14r.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62f.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=1664771766; 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=1oIAkUpl1F9AUyt5ZJXLP5QlKRLpTV3O4gJIuHy8rn0=; b=kBJCAzYR7zBQglVgxgtK6aoU9dDklbEF+A1IeHzHCPO//J1kydphhW+2VIGuGt2xUhj3FN ZujioGO7EhYpiDAsGprTNXVWLgAqYFNm0hErvYXr4FlJb86YXe0G+yhreP581r78x6Anrz QqAjEPeQEk0VvCHg3NFtJATttWm7vMlnvKNm7rJ7MKr7UV712NfPTX3hjAq2SXUYfHW2xg zOXHGV+hoSvWKg2ckMqANTT+t93U43cIx2tauOsuC3wZ9BHSUIutGOA0nbTGhfiZZhQoIB 8dg4tzVt+YqTJ02UAzwt8JJeMeVWGW3wHJbnHUwxzfjzWMY76l+OZT0h2Jskcw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664771766; a=rsa-sha256; cv=none; b=A3j9fwgcmfmRnG39UTmXHcMdqJ0ZxNyfCjXHXbQxFhKY68mJA1nQHM8tNWqC+0ALHg3gtE hE0UMBXMdNupWnnjaV2djDhHrAU0ZykeLAlh+1nnjeV802GkJMlEy3OUYlyIj8jZ9d2elL xuTq5rjMjGaOG/2+PvFv9sb9IwoscSSqz/+0RMiakALPtrFe7Rz6pvC1O8OzW5LqcZhL0K KQxX3uEv74NvNLvzcq6F9Yz6W0mDXVABQEIJhybY6tU1nHrg+9zO6A4GE/Hiu3GwTtSnl8 9t4H088lLBjJNHpmgQZiCA8EMzHjZkz/k+2YYj+xbhm6ZFmcik+4IFAE3kdJUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=B523bECG; 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: -6.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=B523bECG; 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: DE7671768A X-Spam-Score: -6.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: xh+4//qdxrDe Max Nikulin writes: > On 02/10/2022 11:59, Ihor Radchenko wrote: >> Can you please illustrate how to use the described AST markup for the >> following Texinfo snippet: >> >> By convention, the dynamic library for @var{language} is >> @code{libtree-@{sitter@}-@var{"language"}.@var{ext}}, where @var{ext} is the >> system-specific extension for dynamic libraries. > > If you are asking how to represent such construct without introducing > custom elements then (it may be e.g. :type, not :class) parsed AST > should be like > > (code nil ("libtree-{sitter}-" > (code (:class var) "\"language\"") > "." > (code (:class var) "ext"))) This is not much different from @name[nil]{} idea, but more verbose. Also, more importantly, I strongly dislike the need to wrap the text into "". You will have to escape \". And it will force third-party parsers to re-implement Elisp sexp reader. > If there was some syntax for object attributes then simple cases would > be like > > [[attr:(:class var)]]~language~ I do not like this idea. It will require non-trivial changes in Org parser and fontification. Using dedicated object properties or at least inheriting properties from :parent is the style we employ more commonly across the code: @var{language} or @code[:class var]{language} or @attr[:class var]{~language~} > I have no idea concerning particular markup that can be used inside > source blocks. It might be LaTeX-like commands as discussed in the > sibling subthread or HTML (XML) based syntax that is more verbose than > TeX-like notation. > > By convention, the dynamic library > for src_alt{\code[class=var]{language}} is > > src_alt{\code{libtree-\{sitter\}-\code[class=var]{"language"}.\code[class=var]{ext}}}, > where src_alt{\code[class=var]{ext}} is the > system-specific extension for dynamic libraries. I am against the idea of LaTeX-like commands. It will clash with latex-fragment object type. https://orgmode.org/worg/dev/org-syntax.html#LaTeX_Fragments > or > > By convention, the dynamic library for > src_alt{language} is > src_alt{libtree-{sitter}- class="var">"language".ext}, > where src_alt{ext} is the > system-specific extension for dynamic libraries. This style will indeed make things easier for the parser. But I find it too verbose for practical usage. This is why I instead proposed the idea with variable number of brackets: @code{{can have } inside}}. > Hypothetical "alt" babel language has default :results ast :export > results header arguments to inject AST bypassing Org markup stage. The problem with src block emitting AST is clashing with the way src blocks work during export. What `org-export-as' does is replacing/adding src block output into the actual Org buffer text before the parsing is done. Handling direct AST sexps will require a rewrite on how babel integration with export works. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at