unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kenichi Handa <handa@m17n.org>
Cc: list-general@mohsen.1.banan.byname.net, emacs-devel@gnu.org
Subject: Re: bidi and shaping problems in describe-input-method
Date: Sat, 10 Mar 2012 12:27:28 +0200	[thread overview]
Message-ID: <8362eczr73.fsf@gnu.org> (raw)
In-Reply-To: <87r4x1uptx.fsf@m17n.org>

> From: Kenichi Handa <handa@m17n.org>
> Date: Sat, 10 Mar 2012 11:55:54 +0900
> Cc: list-general@mohsen.1.banan.byname.net, emacs-devel@gnu.org
> 
> The function body I wrote is just an idea, not a complete
> solution, and of cource checking against L is apparently
> a bug.  At least we must check against R (and AL).
> 
> > > > Also, `lower' and `upper' could be strings, in which case you need a
> > > > more complex test.
> > > 
> > > We can give (if (string lower) (aref lower 0) lower) to that
> > > function.
> 
> > But that doesn't DTRT.  Here's an example where it will fail: ".A".
> 
> Why?

I was explaining why testing for L is not TRT.

> ... | LU | LU | ...
> 
> What we want is to display the left LU to the left of the
> right LU, and display each L (character or string) to the
> right of the corresponding U.
> 
> Even if the L (of the left LU) is ".A", we don't need LRM
> for it.  We have to insert LRM only before a character that
> may reorder the previous characters, and after a character that
> may reorder the following character.  Isn't it right?

You are describing what bidi-string-mark-left-to-right does, I
believe.  Note that it will still insert LRM in some cases where it is
not strictly needed.

> > I tried also a different solution: enclose each row of the keyboard
> > layout in an L2R override embedding, LRO..PDF.  This inserts only 2
> > control characters per row, and doesn't insert them inside the
> > keyboard cells, so it is cleaner, I think.  But using this means that
> > no key description in the layout can be a string that requires
> > reordering individually.  (By contrast, inserting an LRM between the
> > lower and the upper key still allows each description to be
> > reordered.)  Can we live with such a restriction?  I don't know enough
> > about Quail to tell.
> 
> As it's possible to assign a string to a key, there will be
> the case that the characters in the string must be
> reordered.  In the above case, if L is a hebrew "שלום", it
> must be reordered.  But, even if we surround that word with
> LRE and PDF, the word itself is reordered correctly, right?

Yes.  But surrounding each `lower' and `upper' key labels in the
layout with LRE..PDF inserts even more bidirectional control
characters than just inserting LRM.  By contrast, using LRO..PDF
around the whole row of keys inserts just 2 such characters, so if it
were not for the need to reorder the individual key labels, LRO..PDF
would be a better alternative.  I mentioned it because it does exactly
what you originally asked for: it effectively disables
bidi-display-reordering inside the embedded text, while still leaving
the rest of the buffer reordered as usual.




  reply	other threads:[~2012-03-10 10:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 22:17 bidi and shaping problems in describe-input-method Mohsen BANAN
2012-03-07  4:05 ` Eli Zaretskii
2012-03-07 18:49   ` Eli Zaretskii
2012-03-07 21:32   ` Mohsen BANAN
2012-03-08 15:30     ` Kenichi Handa
2012-03-08 18:24       ` Eli Zaretskii
2012-03-08 23:48         ` Kenichi Handa
2012-03-09  8:11           ` Eli Zaretskii
2012-03-09 14:03             ` Kenichi Handa
2012-03-09 16:12               ` Eli Zaretskii
2012-03-10  2:55                 ` Kenichi Handa
2012-03-10 10:27                   ` Eli Zaretskii [this message]
2012-03-12  7:47                     ` Kenichi Handa
2012-03-12 17:42                       ` Eli Zaretskii
2012-03-13  0:58                         ` Kenichi Handa
2012-03-13  3:58                           ` Eli Zaretskii
2012-03-22  4:26                             ` Kenichi Handa
2012-03-22 17:23                               ` Eli Zaretskii
2012-03-23  1:41                                 ` Kenichi Handa
2012-03-23 10:12                                   ` Eli Zaretskii
2012-03-22 21:59                               ` Mohsen BANAN
2012-03-13  5:46                       ` Mohsen BANAN
2012-03-09  8:17           ` Eli Zaretskii
2012-03-08 18:30       ` Eli Zaretskii
2012-03-08 18:53         ` Eli Zaretskii
2012-03-08 23:27           ` Kenichi Handa
2012-03-08 23:19         ` Kenichi Handa
2012-03-09  8:15           ` Eli Zaretskii
2012-03-09  9:01             ` Juanma Barranquero
2012-03-09  9:45               ` Eli Zaretskii
2012-03-09 10:02                 ` Eli Zaretskii
2012-03-09 14:11                   ` Kenichi Handa
2012-03-09 11:19                 ` Juanma Barranquero
2012-03-09 11:41                   ` Eli Zaretskii
2012-03-09 14:56                     ` Juanma Barranquero
2012-03-09 13:54             ` Kenichi Handa
2012-03-09 16:15               ` Eli Zaretskii
2012-03-08  4:30 ` Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8362eczr73.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=list-general@mohsen.1.banan.byname.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).