emacs-bidi
[Top][All Lists]
Advanced

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

[emacs-bidi] Suboptimal display-reordering in minibuffer


From: Larry Denenberg
Subject: [emacs-bidi] Suboptimal display-reordering in minibuffer
Date: Sat, 26 Jun 2010 10:38:54 -0400

Suppose I'm typing Hebrew and have bidi-display-reordering set globally
(i.e., by setq-default).  I type a Hebrew control character, say
control-bet, which has no command binding.  I quite properly get the
message "control-bet is undefined" in the minibuffer.  But because it
starts with a Hebrew character, it gets shoved against the right margin,
which is wrong.

What to do?

The obvious answer is that I'm at fault for blindly setting display
reordering in all buffers.  This is true, but I don't know a better way
to turn it on everywhere, as I want.  And isn't the intent to have it on
by default eventually?

Since system minibuffer are always in English, maybe the minibuffer
should never be in display reorder mode.  I tried to do it myself thus:

     (defun forceLTR () (setq bidi-paragraph-direction 'left-to-right))
     (add-hook 'minibuffer-setup-hook 'forceLTR)

but this doesn't work.  Anybody know what I'm doing wrong?  It didn't
help to set bidi-display-reordering to nil instead.  Perhaps the problem
is that this "undefined" message is *very* low level, not using standard
minibuffer message commands---certainly it doesn't show up in the
*Messages* buffer.

Another way to handle the case of an English paragraph that starts with
a Hebrew character is to insert an LRM.  In this case that would need to
be done by the code that finds character bindings.  I think that code
should indeed be sensitive to the fact that the unbound character it's
about to echo might set display direction.  Perhaps this is better than
setting the minibuffer's mode as a whole.  Or maybe both are necessary.

Finally, an even more subtle (and unimportant) issue:  The actual
message I see looks like this: "is undefined ^ב”.  But I would have
expected "is undefined ב^”, no?  Shouldn't control-bet be written with
the uparrow on the right when in RTL mode?

/Larry Denenberg
address@hidden
http://larry.denenberg.com/



reply via email to

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