emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Why is there no inline-src syntax highlighting?


From: Timothy
Subject: Re: Why is there no inline-src syntax highlighting?
Date: Mon, 29 Mar 2021 22:53:19 +0800
User-agent: mu4e 1.4.15; emacs 28.0.50

Thanks Sébastien and Ihor :) I've combined a bit of both of your
suggestions. See
https://github.com/tecosaur/emacs-config/commit/1afd9eaca.

Sébastien Miquel <sebastien.miquel@posteo.eu> writes:

> I think there are these two issues with the code :
>  - When an inline src blocks has no matching result part,
>    `org-fontify-inline-src-blocks-1` returns nil. It should return t
>    instead, then it will be called again, to fontify the next block.

TBH I'm not quite sure what should be done here the way I've structured
things, but following Ihor's suggestion and changing `when' to `while'
worked. I checked with highlight-refontification and it seems like this
doesn't result in spurious fortification (I guess "limit" is set well).

>  - If an inline src block without results is followed by a src block
>    with results, your function skips over the second src block.
>    Perhaps you should assume that only whitespace separates a src
>    block and its results (this is already assumed for subsequent
>    evaluations of the block  to replace the results).

Nice catch, thanks! I think I've got this handled much better now :)

If you have any further advice, please don't hesitate to share.

--
Timothy.



reply via email to

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