From: Ihor Radchenko <yantar92@gmail.com>
To: Rick Lupton <rclsub@fastmail.com>
Cc: "Y. E." <emacs-orgmode@gnu.org>
Subject: Re: [HELP] Fwd: Org format as a new standard source format for GNU manuals
Date: Thu, 06 Oct 2022 11:39:06 +0800 [thread overview]
Message-ID: <87zge962p1.fsf@localhost> (raw)
In-Reply-To: <4f4f2b89-ee99-471f-8105-4c54fe1adfc1@app.fastmail.com>
"Rick Lupton" <rclsub@fastmail.com> writes:
> I wonder if you have seen Pollen’s 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 discussion. I’m not sure if they are useful in the org context.
>
> 1. The use of a special character (◊ by default) which introduces a command/inline special block. I don’t know if this would be worth considering as an alternative to @ (which also seems reasonable) to avoid ambiguity with other syntax. As the link above discusses it’s harder to type but there are solutions.
I do understand the idea behind ◊, 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.
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 bit like perhaps Max's suggestion to use source blocks, but instead of writing AST-like structure directly in the document where you want it, you can call a previously defined function to build it. This is similar to org macros but I’m not sure if they are so flexible as a lisp function. There is also the option to choose between passing arguments as lisp (in [ ]) or 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
‘(eval’ as an Emacs Lisp expression and evaluates it accordingly.
Within such templates, arguments become strings. Thus, the following
macro
#+MACRO: gnustamp (eval (concat "GNU/" (capitalize $1)))
turns ‘{{{gnustamp(linux)}}}’ into ‘GNU/Linux’ 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).
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2022-10-06 3:40 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1ocmvz-0002iB-2M@fencepost.gnu.org>
2022-09-30 3:31 ` [HELP] Fwd: Org format as a new standard source format for GNU manuals Ihor Radchenko
2022-09-30 3:49 ` Samuel Wales
2022-09-30 5:47 ` Thomas S. Dye
2022-09-30 8:25 ` Christopher M. Miles
2022-09-30 12:49 ` Max Nikulin
2022-10-01 3:30 ` Ihor Radchenko
2022-10-01 10:42 ` Max Nikulin
2022-10-01 11:01 ` Ihor Radchenko
2022-10-01 11:27 ` Max Nikulin
2022-10-02 4:59 ` Ihor Radchenko
2022-10-02 10:38 ` Fraga, Eric
2022-10-02 13:02 ` Ihor Radchenko
2022-10-02 13:21 ` Fraga, Eric
2022-10-02 13:47 ` Juan Manuel Macías
2022-10-03 4:23 ` Ihor Radchenko
2022-10-04 20:28 ` Juan Manuel Macías
2022-10-05 6:56 ` Rick Lupton
2022-10-06 3:39 ` Ihor Radchenko [this message]
2022-10-02 16:28 ` Max Nikulin
2022-10-03 4:36 ` Ihor Radchenko
2022-10-04 16:32 ` Max Nikulin
2022-10-06 5:55 ` Ihor Radchenko
2022-09-30 20:36 ` Tim Cross
2022-10-01 4:08 ` Ihor Radchenko
2022-10-01 8:01 ` Tim Cross
2022-10-01 15:08 ` Max Nikulin
2022-10-03 4:19 ` Ihor Radchenko
2022-10-07 22:48 ` Richard Stallman
2022-10-08 6:52 ` Ihor Radchenko
2022-10-08 22:34 ` Richard Stallman
2022-10-11 3:03 ` Robert Weiner
2022-10-11 12:16 ` Ihor Radchenko
2022-10-12 22:00 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zge962p1.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rclsub@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).