> From: Larry Denenberg <la...@denenberg.com> > Date: Sat, 26 Jun 2010 10:38:54 -0400 > Cc: > > 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.
Why is it wrong? > And isn't the intent to have it on by default eventually? Yes. In fact, Stefan (one of the two head maintainers) already asked me to do that, but I'm stalling ;-) > Since system minibuffer are always in English, maybe the minibuffer > should never be in display reorder mode. What do you mean by ``minibuffer are always in English''? The language and the paragraph direction are not necessarily related. > 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? I think this is because the minibuffer and the echo area are not the same thing. They just use the same portion of the Emacs display. The minibuffer is in use when Emacs prompts you for something, which is not the case here. Does it work to set bidi-display-reordering in two buffers named " *Echo Area 0*" and " *Echo Area 1*"? (Note the blank at the beginning of the names of these buffers: it is important.) You can switch to these two buffers after entering Emacs, with the "C-x b" command. > 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. The main point here is deciding whether echo area messages should be displayed with left-to-right paragraph direction forced on the display engine. Are we sure this is the case? Cannot there be echo area messages that we want to display with the right-to-left direction? If/when the decision is made, it's very easy to make Emacs behave either way. > 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? I don't know which one is the correct one. Do we have any "prior art" in that some other applications display Ctrl-modified Hebrew characters? Again, once we decide what to do with that, it's a very simple matter to make Emacs behave according to that decision. Comments and opinions are welcome. P.S. Thanks for starting these discussions. Sometimes I think that no one is using the bidi features, which makes me wonder why I worked on them so hard. Your and Amit's messages mean a lot to me. _______________________________________________ emacs-bidi mailing list emacs-bidi@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-bidi