all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: ehud@unix.mvs.co.il
Cc: eliz@gnu.org, miles@gnu.org, stephen@xemacs.org,
	cloos@jhcloos.com, emacs-devel@gnu.org
Subject: Re: Buffer names with R2L characters
Date: Wed, 22 Jun 2011 18:27:14 -0400	[thread overview]
Message-ID: <jwvtybica97.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <201106211759.p5LHxpiT008325@beta.mvs.co.il> (Ehud Karni's message of "Tue, 21 Jun 2011 20:59:51 +0300")

> 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.

That might be a good idea.  At least it would let us encapsulate the
solution to the problem, so we can change it later on.

>> 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).

Maybe another way to attack the problem is to say that the < and the >
in that string are not neutral but "weak L2R" or something like that.
Maybe this would also work for XML markup.

We could specify such a thing via some char-table overriding the
default bidi properties of specified chars.  We would either need to be
able to set this as a text-property over the "<N>", or to have one for
the mode-line.

>> > 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.

Indeed, for the buffer names it seems perfectly acceptable since we
generate them ourselves and they don't go very far.  I'm not sure why
Eli doesn't like this solution.


        Stefan



  parent reply	other threads:[~2011-06-22 22:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 16:21 Buffer names with R2L characters Eli Zaretskii
2011-06-20 18:00 ` Stefan Monnier
2011-06-20 20:52   ` Eli Zaretskii
2011-06-20 20:13 ` James Cloos
2011-06-20 21:08   ` Eli Zaretskii
2011-06-21  4:26     ` Stephen J. Turnbull
2011-06-21  6:28       ` Eli Zaretskii
2011-06-21  8:44         ` Stephen J. Turnbull
2011-06-21 14:28           ` Eli Zaretskii
2011-06-21  4:33     ` Miles Bader
2011-06-21  6:30       ` Eli Zaretskii
2011-06-21  7:26       ` David Kastrup
2011-06-20 21:06 ` Kalle Olavi Niemitalo
2011-06-21  2:51   ` Eli Zaretskii
2011-06-21 16:52 ` Ehud Karni
2011-06-21 17:24   ` Eli Zaretskii
2011-06-21 17:59     ` Ehud Karni
2011-06-21 18:10       ` Eli Zaretskii
2011-06-22 22:27       ` Stefan Monnier [this message]
2011-06-23  9:16         ` Eli Zaretskii
2011-06-25 13:25           ` Stefan Monnier

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=jwvtybica97.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cloos@jhcloos.com \
    --cc=ehud@unix.mvs.co.il \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=stephen@xemacs.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.