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: Ihor Radchenko
Subject: Re: [PATCH] Fontification for inline src blocks
Date: Tue, 23 Nov 2021 21:30:49 +0800

Timothy <tecosaur@gmail.com> writes:

>> I can see the purpose. However, it still looks like overcomplication.
>> org-element-context takes care about this issue simply by narrowing to
>> current element (inline src block is an object and hence must end within
>> current element).
>
> Well, one simple change we could do is just replace
> org-inline-src-fontify-max-length with the addition of `(save-excursion
> (search-forward "\n" limit nil) (point))' to the restriction.

That's an option. Though you should also consider a paragraph ending at
EOB. Searching for "\n" will fail with error then.

>> Sounds like an omission in org-element-context. At least, the parser
>> could return :contents-begin and :contents-end. Then, you would also not
>> need to re-implement the parser.
>
> Perhaps. However frankly I don’t think it would do that much to reduce the
> complexity, and what’s in this patch seems to work fairly nicely.

I am mostly thinking in terms of
87tug8t8ql.fsf@gmail.com/T/#t">https://list.orgmode.org/87tug8t8ql.fsf@gmail.com/T/#t
Otherwise, your variant is fine for me.

Best,
Ihor



reply via email to

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