emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Using backticks for the inline code delimeter?


From: Tim Cross
Subject: Re: Using backticks for the inline code delimeter?
Date: Fri, 02 Apr 2021 11:28:28 +1100
User-agent: mu4e 1.5.11; emacs 28.0.50

Joost Kremers <joostkremers@fastmail.fm> writes:

> On Fri, Apr 02 2021, Tim Cross wrote:
>> Getting backticks to font-lock correctly is relatively easy. Getting the
>> exporters to understand the new syntax is more of a challenge
>
> Don't the exporters work off of some intermediate representation, like Pandoc
> does? I kinda thought that was what `org-element.el` was all about... 
>
> And of course I meant to type ~org-element.el~ there... :D

Yes, at least most of the core ones should. However, I would still
expect some surprises and of course there are no guarantees regarding
the contrib and other external ones. Despite attempts to abstract the
syntax to make it 'flexible', I would be surprised if there is not
functionality in some of the exporters which has implicit assumptions
regarding the syntax being used and is not isolated from such changes. 

Note that I'm not saying this cannot be done or even that is should not
be done. I just want to highlight that just making changes to how org
deals with it at the 'presentation' layer may not be sufficient and that
you would have to verify there are no unexpected side effects in any of
the exporters. If you wanted to keep backwards compatibility or make
using ` and alternative to ~, you would also need to decide/verify
things like `word~ (i.e. mixed delimiters) are handled correctly (i.e.
simple regex with alternatives would not be sufficient - would need to
be a match which allowed both but ensured matching values).

Of course, there is a big difference between making a change to org and
making a change to an individual's own org instance. So if we are
talking about how someone can hack their own org instance to use `
instead of ~, it can be much simpler as they don't have to worry about
the bits they don't use or backwards compatibility. The downside then
becomes just the hassle of maintaining your hacks over subsequent org
releases. One reason why I would probbly go with a method which just
changes how I input data. For example, I would define a function which
inserts ~ or if a region is marked, surrounds it in ~ and then just bind
that to a key, never using ~ or ` directly to mark text.

-- 
Tim Cross



reply via email to

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