[Top][All Lists]

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

Re: Bidirectional text and URLs

From: Eli Zaretskii
Subject: Re: Bidirectional text and URLs
Date: Sun, 30 Nov 2014 17:27:23 +0200

> Date: Sun, 30 Nov 2014 04:38:14 -0500
> From: Richard Stallman <address@hidden>
> Cc: address@hidden
>  > It seems pretty clear that stuff like
>   >      http://myspace.com/#/segami/moc.koobecaf//:sptth
> This is the first time I've observe RTL display in Emacs.  I don't see
> any way to detect the magic character that specifies it.

That's because there isn't one, in the citation you provided.  The
original example was this:


where there is a u+202e character at the rightmost (visual) edge of
the line.  If you move point with C-f from the beginning of that line,
you should see it jump to the right edge of the line after the leading
whitespace, and then continue to "advance backwards", i.e. to the left.

You can search for this character by typing

  C-s C-x 8 RET 202e RET

After typing this, you should see the offending character highlighted
in some reddish background.

> (I am using a terminal as usual.)

These characters are by default displayed as spaces on a TTY, and as a
very thin (1-pixel) space on GUI frames.

> I think we need to provide a way to make them visible.

We already have it: the glyphless-char-display char-table.

> Perhaps it should even be the default.

I don't think so: these controls should normally be all but invisible.
The Unicode Standard actually recommends to remove them from display,
but when I worked on the bidi display engine, I decided that removing
characters by infrastructure is un-Emacsy, so I left them alone.  Lisp
programs and specialized major modes can make them invisible by using
text properties, if they want.

Making these controls visible by default will uglify the display for
no good reason.  These controls are perfectly valid in email messages
with RTL text, for example.

> Also, is there a way to disable bidi in the current buffer?
> If not, I think we need one.

There is a way, but it is not meant for Lisp programs, only for
debugging the display engine.

In any case, I don't think disabling display reordering is the right
solution for the problem at hand.  It's a cure that is worse than the
disease, since Web pages and email messages with RTL text will be
displayed incorrectly, and be almost illegible.

>   > But currently Emacs doesn't really have a mechanism for querying the
>   > directionality of a buffer region, I think?
> I think we need to add this.

We are still discussing what that means, exactly.  When we reach
conclusions, we can start working on implementing whatever is needed.

reply via email to

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