all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org
Subject: Re: Bidi Emacs: R2L paragraphs and the direction of glyph_row
Date: Sat, 28 Nov 2009 13:44:09 +0900	[thread overview]
Message-ID: <4B10AA99.90805@it.aoyama.ac.jp> (raw)
In-Reply-To: <83r5rkm9z3.fsf@gnu.org>

Hello Eli,

Many thanks for your comments. I very much agree with what you say, 
namely that good display for HTML/XML (and similar stuff) should be at a 
level above the basic bidi support, and that it may be implemented by 
somebody else than you.

Nevertheless, I very much look forward to hear from Gregg (and others) 
about what they see as the current problems with bidi editing (such as 
the issue with carret placement that Gregg mentioned).

Regards,   Martin.

On 2009/11/27 21:24, Eli Zaretskii wrote:
>> Date: Fri, 27 Nov 2009 20:11:47 +0900
>> From: "Martin J. Dürst"<duerst@it.aoyama.ac.jp>
>> CC: Gregg Reynolds<gar@arabink.com>, emacs-bidi@gnu.org, emacs-devel@gnu.org
>>
>> On 2009/11/27 1:10, Eli Zaretskii wrote:
>>>> Date: Thu, 26 Nov 2009 08:58:39 -0600
>>>> From: Gregg Reynolds<gar@arabink.com>
>>
>>>> It's also a major pain to edit XML in a bidi editor.  And I do mean
>>>> major.
>>>
>>> Again, an explicit list of main problems would be useful (although I
>>> deliberately decided not to handle bidirectional editing for meta
>>> documents yet, so this specific class of problems is still a long way
>>> from being dealt with).
>>
>> This is a well-known problem. For some more background and some attempt
>> at a solution, please see:
>>
>> http://www.sw.it.aoyama.ac.jp/2005/pub/IUC28-bidi/ and
>> http://www.sw.it.aoyama.ac.jp/2008/pub/IUC32-bidi/
>
> Thanks.
>
> As I pointed out elsewhere, this class of problems is currently beyond
> the scope of what I'm trying to do in Emacs.  That is because the
> display engine basically examines characters one by one, so correct
> display of XML/HTML using just UAX#9 algorithm is impossible, as you
> and others have found out.
>
> I think that support for bidi editing of documents that use markup
> languages should be based on the features that exist as part of the
> markup:&lrm;/&rlm;, the dir= directive etc.  Using these, a Lisp
> application should place overlays or maybe text properties on the
> portions of text that need to be reordered.  For example, one could
> place an overlay on a portion of the buffer with `display' property
> whose value is the reordered text of that portion (it will have to be
> enclosed in LRO..PDF embedding to avoid the automatic reordering when
> the display string is delivered to the glass).  Or we could add a new
> overlay property that would just tell the display engine "reorder this
> part".  Then the display engine will DTRT guided by these overlays and
> text properties.
>
> However, please note that the above is not something I thought about
> long enough to be convinced that it is the right solution.  The only
> thing I convinced myself in at this point is that bidi support for
> markup languages should not be on the basic display engine level,
> which is what I'm currently hacking.  Rather, it should use the basic
> reordering capabilities of the display engine in some way, but do some
> additional work on higher levels to implement the equivalent of the
> UAX#9 ``higher protocols''.
>
>> In a discussion with Ken'ichi Handa and Naoto Takahashi in 2005, they
>> pointed out that using bidi marks in overlays should make it possible in
>> bidi emacs to address this problem. Unfortunately, nobody here is
>> familiar enough with emacs lisp to implement this, but I'd be very glad
>> to help somebody with some emacs lisp skills to work on such a project.
>
> Thanks for the offer.  I don't know when I will get to those parts.
> For now, text properties and overlays are not yet supported in the
> modified display engine -- that is the very next problem on my agenda.
> When these parts are done, hopefully others could come on board and
> implement markup support on top of that.
>

-- 
#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp

      reply	other threads:[~2009-11-28  4:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-17  9:15 Bidi Emacs: R2L paragraphs and the direction of glyph_row Eli Zaretskii
2009-11-26 14:58 ` Gregg Reynolds
2009-11-26 16:10   ` [emacs-bidi] " Eli Zaretskii
2009-11-27 11:11     ` "Martin J. Dürst"
2009-11-27 12:24       ` Eli Zaretskii
2009-11-28  4:44         ` "Martin J. Dürst" [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B10AA99.90805@it.aoyama.ac.jp \
    --to=duerst@it.aoyama.ac.jp \
    --cc=eliz@gnu.org \
    --cc=emacs-bidi@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.