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: Wed, 30 Nov 2005 16:50:57 +0900

At 06:03 05/11/30, Eli Zaretskii wrote:
>> Date: Tue, 29 Nov 2005 12:22:53 +0900
>> From: Martin Duerst <address@hidden>
>> Cc: address@hidden
>>
>> 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.
>
>I'm not sure we should look for private solutions to this problem.
>Editing of such files is not a unique Emacs problem, so someone,
>somewhere will invent a solution

Yes, that's me and my students :-).

>that the Unicode people will adopt.

Could happen, although even for normal text, there is a lot
re. bidi that's currently not standardized, at least not
on the Unicode level. A good example is interactive behavior:
Where and how the cursor should be displayed, which physical
direction it moves for cursor keys such as -> or <-, whether
selection is logical or visual, and so on.

Also, before the Unicode people pick it up, some implementation
experience is probably neededs (Emacs isn't the only editor
we're looking at for this, but it would in many ways be an
interesting target).

>That's what we should implement, when that happens.
>
>That said, this is Emacs we are talking about; all the relevant
>character properties are loaded into internal data structures, so
>there should be no problem, in principle, to fiddle with them for a
>particular mode.

Good to know. The following are potential problems:
- Can the properties be set for each mode individually?
- Can the properties change based on context? As a simple
  example, attributes in XML can be quoted with single quotes
  or with double quotes. In the attribute value, the 'other'
  quote can then be used literally. So if we have something
  like
  <element attr1="What's up?" attr2='He cried "Help!" and ran away.' />
                 1    2     1       1         2     2              1
  then for the places marked 1, which are XML syntax, we want to
  change the properties (e.g. to LTR), but for the cases marked
  with 2, which are content, we do not want to change the properties.
  Would such a thing be possible?
- In our current approach, we not only change the properties of some
  characters, but also introduce additional embedding (or occasionally
  override) levels. Is this possible in your implementation?

>In any case, the solution for such obscure problems is far, far away
>for Emacs.  For now, I'd be happy if we could edit simple text files.

I understand that. Just thinking ahead :-).

>>  >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.
>
>That's not needed: a user could modify the character property tables
>with a bunch of Lisp code.

(see above)

Regards, Martin.




reply via email to

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