emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Verbatim content (inline-special-block)


From: Ihor Radchenko
Subject: Re: Verbatim content (inline-special-block)
Date: Fri, 12 Apr 2024 17:53:24 +0000

Max Nikulin <manikulin@gmail.com> writes:

>> It may be enough to have @kbd{@code{...}} - it is not like Texinfo has a
>> concept of truly verbatim text like in Org.
>> 
>> Alternatively, we may allow two classes of inline markup:
>> @foo{parsed *text* inside}
>> and
>> @foo={verbatim *text* inside}/@foo~{verbatim *text* inside}
>> 
>> This way, instead of @code{}, we should use @code~{...} or even
>> @~{...}/@={...} (mnemonics for ~...~ and =...=)
>
> I consider @foo={}-like variants as unnecessary complications of the 
> inline special block feature. The idea of composition is better from my 
> point of view. With this approach it is enough to have non-conflicting 
> syntax for non-parsed fragments. I am against making @code{} a special 
> name with suppressed markup parsing. The price of composition in 
> comparison with @foo={} is more verbose markup.

Then, do you have an idea about such syntax?

One option I thought of was making @foo{=...=} a special type of boundary
delimiting non-parsing contents. However, it is not very elegant IMHO.

> By the way, Org has src_lang{...} syntax for almost non-parsed fragments 
> (neglecting requirement of balanced curly brackets that is an issue).

Yes, but it is handled differently by exporters from =verbatim=/~code~.
In fact, even the idea with @foo{@code{...}} may be problematic in this
regard - @code{...} inside, if we treat it as an equivalent of ~code~,
may be problematic if some export backends do something unusual about
code markup.

> Actually "=" in @foo={} is a kind of special argument distinct from ones 
> specified inside [] and {}.

Yes, but it is much easier to parse. If we use a proper attribute, we
run into all kind of issues with how consistent it should be with the
parsing rules for other attributes (should it be inherited? may it
appear in arbitrary place in [...]?). And if we make it special, we will
run in various special cases in the parser...

>>>       @code{def calculate(@param{expr}, @param{env})}
> [...]
>> Also, the reason why Texinfo users do @param in @code is the lack of
>> automatic syntax highlighting, unlike in Org mode.
>
> Is ox-texinfo able to convert syntax highlighting to native texinfo markup?

No.

> So if @markup{} is not allowed in verbatim content then it is another 
> feature loosely related to custom inline blocks.

May you elaborate?

-- 
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>



reply via email to

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