emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Fontification for inline src blocks


From: Timothy
Subject: Re: [PATCH] Fontification for inline src blocks
Date: Mon, 03 May 2021 05:03:59 +0800
User-agent: mu4e 1.4.15; emacs 28.0.50

Thanks for trying this!

Tom Gillespie <tgbugs@gmail.com> writes:

> Hi Timothy,
>    It seems to work more or less as expected. A few comments below. Best,
> Tom
>
> 1. I think there needs to be a function to toggle
> org-inline-src-prettify-results as there is e.g. for hyperlinks. I was
> quite confused by the prettified results.

I see. I imagine the expected behaviour of such a function would be to
toggle org-inline-src-prettify-results and redisplay?

> 2. I'm also not sure that this approach to prettify is a good idea.
> There are issues with unexpected killing/yanking and basic navigation
> behavior of the prettified text which seem worse than the already
> troublesome issues with hyperlinks. I'm not sure we can do anything
> about this though?

If there is something that can be done, I'd love to hear about it. I'm
no aware of anything though.

> 3. I'm not sure about the default choice for prettified delimiters. I
> see there is already a way to customize the delimiters by providing a
> cons. I think a default value of '("" . "") might be a better choice
> since ⟨ and ⟩ being hardcoded seems like it introduces completely
> alien characters. Going with empty strings also seems consistent with
> the behavior for hyperlinks.

Hmmm, yes. Perhaps something else would make for a better default.
I'm open to suggestions on this, I just didn't personally like any of
the ASCII chars I tried when writing this.

> 4. There is an interaction with rainbow delimiters that there isn't an
> easy solution for. I wish there was a syntax type that was "this is a
> paren for electric pair mode but not for font locking."

This sounds like something worth being aware of, that nothing can really
(currently) be done about.

> 5. I'm not sure that the faces selected for src_ and lang are the
> right ones. Is there any issue with adding new faces specifically for
> those rather than reusing existing faces? I thought that matching the
> font locking of #+begin_src lines might make sense, but then I
> realized that that doesn't make sense because that is for blocks more
> generally.

I don't know if adding faces is a big deal or not, so I tried to pick
"sensible choices" from the current set. Further input on this would be
appreciated (particularly more people's thoughts).

--
Timothy



reply via email to

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