emacs-bidi
[Top][All Lists]
Advanced

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

[emacs-bidi] Re: Callbacks?


From: Martin Duerst
Subject: [emacs-bidi] Re: Callbacks?
Date: Tue, 29 Nov 2005 12:22:53 +0900

Hello Eli,

Thanks for your comments. They are very useful
in particular to debug our explanation of what
we have been doing and are trying to do.

At 05:16 05/11/29, Eli Zaretskii wrote:

>I've read the page you cite above, and I'm sorry to say that I don't
>have a clear idea what are you asking.  The Web page seems to say that
>one can use RLM, LRM, and the embedding marks provided by UAX#9 to
>force correct display of source files for XML and similar files.  Is
>that what the paper says, or did I miss something?

Yes, in some ways, it says that. And we have indeed used that
for our Web-based simulation. Or to be exact, we have used the
bidi features provided in HTML that correspond to the marks
that you mention above.

It is also I guess true that in a very broad sense, any bidi
display problem can be solved by using the means provided by
the Unicode bidi algorithm.

However, for the reasons explained in my response to Gregg,
we do NOT propose to add RLM, LRM, and so on directly to
the source code.

One may immagine a solution that adds these things to the
source code in the internal buffer, but then removes them
on saving the file. But that creates two problems:
1) How to distinguish between marks added to fix the
   HTML/XML source display problem and marks in the
   content.
2) How to fix all the code that e.g. assumes that the XML
   in the buffer is well-formed, and so on? (this is very
   similar to the problems described by Benjamin on a
   different level).

So in a very short summary, what we are looking for is
the ability to say things like "treat this character as
strong right-to-left" or "treat the sequence of characters
from here to here as an [RTL/LTR] embedding", and so on,
without putting the Unicode bidi marks into the buffer.

A mode for a particular kind of source (e.g. an XML mode
for XML source) would then provide the necessary information,
and the display code would take this information into account.

>If I understood correctly, there's no need to implement anything in
>addition to the code I wrote: it includes full support for all the
>special characters mandated by UAX#9, and also fully supports
>embeddings.

It is very good to know that the algorithm is fully supported.

>As for ``callbacks'', what do you need those for, and how can they
>solve your problem (which I probably don't understand)?

Well, a typical example would be a callback that checks whether
the user (or the mode used,...) thinks that a character should
have a different bidi character class than assigned by the
Unicode character database. Such a callback could be called
whenever the display algorithm needs to know the bidi character
class of a character. Of course I'm not sure callbacks
would be the best way to implement this; things might get
rather slow. Character properties or something similar may
be a much faster solution.

Regards, Martin.




reply via email to

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