emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] Re: Callbacks?


From: Martin Duerst
Subject: Re: [emacs-bidi] Re: Callbacks?
Date: Thu, 01 Dec 2005 20:26:35 +0900

At 22:13 05/11/30, Gregg Reynolds wrote:
>Have you taken a look at the source for nxml mode? You might be able to hack it up do do something like this. As I understand it, in Emacs you can set whatever properties you like on each character in a buffer. See node 32.19, "Text Properties", of the Elisp manual.

I haven't looked at the actual nxml source, but otherwise,
that's very much what I have thought about.

>Now the interesting possibility presents itself, which is to add Unicode-related "special" (ie. built-in) text properties. In particular, directional class.

Exactly!

>Then allow the user to override the Unicode-defined class for any particular character or set of chars in a buffer. So in your example above, the nxml parser identifies weakly directional chars in the XML syntax, and switches their "unicode-directionality" property to strong LTR. Voila! The bidi reordering obeys the user-set directionality and does the right thing.

Sorry I wasn't able to express this as well as you did.
This is exactly the direction we are working on.
The problem is that in some cases, only e.g. making '<', '>',
and so on (the markup characters) strong LTR isn't enough.
(but it gets a long way). Sometimes embeddings or
overrides are needed, and they are a bit more difficult
to do with properties, in particular if they are nested.

Regards, Martin.




reply via email to

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