emacs-devel
[Top][All Lists]
Advanced

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

Re: Buffer names with R2L characters


From: Ehud Karni
Subject: Re: Buffer names with R2L characters
Date: Tue, 21 Jun 2011 20:59:51 +0300

On Tue, 21 Jun 2011 20:24:04 +0300, Eli Zaretskii <address@hidden> wrote:
>
> First, why do we need the LRM at the beginning?  The mode line is
> formatted with L2R "paragraph direction", so the leading LRM is
> unneeded (though won't do any harm).  The "*Buffer List*" buffer is
> forced to use L2R paragraph direction as well, so the leading LRM is
> not needed there as well.

The 1st LRM may be unneeded but I will add it any way for the general
implementation - any substring that contain R2L character and indented
to be used in L2R paragraph will be enclosed on both sides by LRM, so
it can be inserted without introducing new problems.

I think that we need a new functions, something like R2L-quote and
L2R-quote that will produce strings that will not cause problem when
used in R2L (or L2R) reading direction.

> And second, what do you mean by "zero width"?  The current facilities
> let me change the LRM display only globally, so I cannot make these
> LRM characters zero-width only in the mode line -- they will be
> displayed as such in all the buffers and strings.  Moreover, I'm not
> sure TTYs support zero-width.
>
> Instead, I propose to make the LRM invisible.  This is supported on
> all display types.

May be we need 2 LRMs (and 2 RLMs), the normal "real" one, which is part
of the user text, and a "virtual" one, which is always invisible, ignored
by search, and never saved. This will solve many problems, but will create
others. May be use the "virtual" LRM/RLM only on non saved text (like the
mode-line, dired buffer and so on).

> > I think Eli is wrong here. An example will help, a file with the
> > (logical) name "/abc/def GHIK/LMNO qrst" when uniquified will appear
> > as: "def ONML|KIHG qrst" which is clearly wrong.
> >
> > My way to solve it is as above, i.e. add zero width LRM on both sides
> > of the separator (/ or |) in addition to the enclosing LRMs.
>
> I think this is beginning to become gross.

But it is a general solution that is easily implemented.

> > The problem is even greater in `dired' with files that have ALL Hebrew
> > names. If you have a Hebrew locale, the date has Hebrew in it (the
> > month name) then it has some digits and ":" (all neutrals and weak
> > L2R ) and then the file name. The bidi algorithm actually exchange
> > the month and file name.
>
> Yes, Dired (and other similar modes) will "need work" (TM) to give a
> plausible display with bidi.  Patches are welcome.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry



reply via email to

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