From: Timothy <tecosaur@gmail.com>
To: sebastien.miquel@posteo.eu
Cc: emacs-orgmode@gnu.org
Subject: Re: Why is there no inline-src syntax highlighting?
Date: Mon, 29 Mar 2021 22:53:19 +0800 [thread overview]
Message-ID: <87lfa6ko4h.fsf@gmail.com> (raw)
In-Reply-To: <4ef07c13-482d-734c-aa17-479439493c68@posteo.eu>
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.
next prev parent reply other threads:[~2021-03-29 14:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 10:19 Why is there no inline-src syntax highlighting? Timothy
2021-03-14 15:00 ` Eric S Fraga
2021-03-14 18:18 ` Colin Baxter
2021-03-14 18:27 ` Timothy
2021-03-14 18:36 ` Colin Baxter
2021-03-14 18:29 ` Timothy
2021-03-15 6:07 ` Andreas Leha
2021-03-29 13:01 ` Timothy
2021-03-29 13:58 ` Sébastien Miquel
2021-03-29 14:53 ` Timothy [this message]
2021-03-29 13:59 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfa6ko4h.fsf@gmail.com \
--to=tecosaur@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=sebastien.miquel@posteo.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.