emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Org-syntax: Intra-word markup


From: Denis Maier
Subject: Re: Org-syntax: Intra-word markup
Date: Sat, 4 Dec 2021 16:57:53 +0100

Am 03.12.2021 um 15:24 schrieb Max Nikulin:
On 03/12/2021 02:03, Nicolas Goaziou wrote:
Denis Maier writes:

As for suggestions: If just using /intra/word creates ambiguities, what
about the asciidoc solution? So //intra//word?

I sympathize to the idea of intra-word emphasis, but the syntax above is
going to cause some ambiguous situations.

I suppose, some more general solution is required.

I do think the marker + zero-width space is one way to go. We could, as
an improvement, consider zero-width spaces around emphasis markers to be
part of the markup, and replace them along during export.

Zero-space characters adjacent to emphasis markers is a better idea than replacing any zero space. However I agree with Juan Manuel that white space characters, especially completely invisible (I am not Eli who sees such special characters by moving cursor through them) should not be overloaded. From my point of view, it is acceptable to use zero width spaces as a workaround but they should not become official part of Org syntax.

Another solution is to introduce a less-subtle, but less prone to
ambiguity, syntax, e.g.,

                   /{bold}/markup   or   /|bold|/markup

where /{ }/  or /|  |/ become "extended" markers.

More explicit markup leaves less room for ambiguities, and I like the idea due to this reason. On the other hand it diverges from principle of lightweight markup. The almost only special character in TeX is "\", HTML has three ones "&<>" with simple escape rules. Org uses many special characters to avoid verbosity and requires some tricks to escape them. Markers like "\{" make Org more verbose but do not make it more strict, a lot of things still rely on heuristics.

I have an idea what can be done when some special markup is required that is not fit into current syntax. Unfortunately some new constructs should be introduced anyway: inline objects and multiline elements that represent simplified result of parsed Org structures:

     ((italic "intra") "word")

wrapped with some markup. It should satisfy any special needs (and even should allow to create invalid impossible constructs). Maybe idea of combination of lightweight markup and low-level blocks better suits for some other project with more expressive internal representation. In Org it may become the most hated feature.

I have to admit I like this idea. That brings a lot of flexibility to accomodate even the most obscure needs, yet it makes the discussion about escape characters or new symbols much less pressing. After all, most markup languages face the same problem, i.e., special characters are limited, and beyond the usual /*_ the meaning of characters becomes much less obvious.

This idea reminds me a bit of Scribble/Racket where every document is just inverted code, which makes it possible to insert arbitrary Racket code in your prose...

Denis








reply via email to

[Prev in Thread] Current Thread [Next in Thread]