[Top][All Lists]

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

Re: Trojan Source detection/highlight in Emacs?

From: Eli Zaretskii
Subject: Re: Trojan Source detection/highlight in Emacs?
Date: Tue, 02 Nov 2021 17:19:13 +0200

> Date: Tue, 02 Nov 2021 10:56:50 -0400
> From:  Stefan Monnier via Users list for the GNU Emacs text editor 
> <>
> I don't think it's the case that bidi reordering is done "before
> font-lock and similar features examined the text" (bidi reordering
> applies to text rendering and font-lock faces are applied before the
> buffer's text is rendered).

font-lock is applied as part of redisplay, in layers that are above
bidi reordering.

> > I would start with detecting such reordered code and flagging it.
> Indeed, another approach is to render it "normally" and then flag those
> places where the rendering may mislead the reader, which could also
> include the confusables.

Isn't that the same as I said?

> A simple and straightforward way to do that is to highlight any
> non-ASCII char, and to render all the "non printing" chars (such as
> RIGHT-TO-LEFT OVERRIDE) as tofu or something like that (otherwise, the
> highlighting applied to it wouldn't be visible).

That's already available, no changes needed.

reply via email to

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