[Top][All Lists]
[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 19:52:18 +0300 |
On Mon, 20 Jun 2011 19:21:00 +03:00 Eli Zaretskii wrote:
> A buffer name typed as ABCDEF<2> is displayed in the mode line
> like this:
>
> 2>FEDCBA>
>
> [snip]
>
> I can fix this .... by appending a suitable character to the end of
> the string (after the numeric tail) and making it invisible with text
> properties.
The "right" way to fix this is to have the buffer name between 2 zero
width LRM characters.
On Mon, 20 Jun 2011 14:01:00 -04:00 Stefan Monnier wrote:
SM> Another important case is when you use uniquify ... file buffers
SM> add the directory info to disambiguate the name ...
On Mon, 20 Jun 2011 23:52:44 +03:00 Eli Zaretskii answered:
EZ> You get something like foo/bar/FEDCBA, so there's no problem here,
EZ> I think.
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.
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.
File names are trouble - here is a paragraph from UAX#9:
However, in the case of bidirectional text, there are circumstances
where an implicit bidirectional ordering is not sufficient to
produce comprehensible text. To deal with these cases, a minimal
set of directional formatting codes is defined to control the
ordering of characters when rendered. This allows exact control
of the display ordering for legible interchange and ensures that
plain text used for simple items like filenames or labels can
=========
always be correctly ordered for display.
On Tue, 21 Jun 2011 13:33:13 +0900 Miles Bader wrote:
> Do you think this case will be common enough in practice to be worth
> worrying about in the short term?
>From work for an Israeli company, I can assure you it is common.
For example there are 3 different directories named "SHIRIM" (songs),
and at least 5 different directories with the Hebrew name of one of
the client on public disk.
Ehud.
--
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
Re: Buffer names with R2L characters, Kalle Olavi Niemitalo, 2011/06/20
Re: Buffer names with R2L characters,
Ehud Karni <=
- Re: Buffer names with R2L characters, Eli Zaretskii, 2011/06/21
- Re: Buffer names with R2L characters, Ehud Karni, 2011/06/21
- Re: Buffer names with R2L characters, Eli Zaretskii, 2011/06/21
- Re: Buffer names with R2L characters, Stefan Monnier, 2011/06/22
- Re: Buffer names with R2L characters, Eli Zaretskii, 2011/06/23
- Re: Buffer names with R2L characters, Stefan Monnier, 2011/06/25