emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] Incorrect cursor positioning for BN characters at EOL


From: Eli Zaretskii
Subject: Re: [emacs-bidi] Incorrect cursor positioning for BN characters at EOL
Date: Sat, 03 Jul 2010 11:35:41 +0300

> From: Larry Denenberg <address@hidden>
> Date: Fri, 02 Jul 2010 23:40:43 -0400
> Cc: 
> 
> Start with an empty buffer and set bidi-display-reordering non-nil.
> (BTW, it would be nice for this variable's doc to start with an asterisk
> so you could set it with M-x set-variable.)
> 
> Now enter text on the first line, plus a line ending in a backspace
> (which displays as ^?), followed by other lines.  E.g., enter this:
> 
>   hello RET RET RET RET RET abc RET def ^P ^E ^Q <delete>
> 
> [Digression:  Why does the ^P here put the cursor after the "d" rather
> than after the "f", as I expect?  This is an Aquamacs, not bidi, thing.]

Is it possible that you actually typed another RET after def?
Otherwise, C-p should have put you after c in the abc line, not after
d or f on the def line.

If you did type another RET, then Emacs is correct putting the cursor
after d, because that's how it behaves after a RET: the goal column is
set to zero.  To see what you want, you need to go to the end of the
def line, type C-n and then C-p.

In any case, please describe the display after all this input.
Specifically, where (in which line) do you see the `^?' glyph? is it
at the end of that line or somewhere else?

> At this point you expect the cursor to be just after the ^?, but it has
> jumped to the end of the first line of the buffer.  It's not really
> there, it just displays there whenever it's immediately after the ^?, as
> you can prove by moving the cursor around.  It also displays at the end
> of the top line if it's just before the ^?, but only if you got there
> from just after it, not if you sneak up from in front.

I cannot reproduce this with the current development sources.  When
was your Emacs checked out and built?  There were similar problems
with display of control characters at the end of a line, but I solved
them by extensive changes which were checked into the repository on
May 19.  If your build is from sources before that, you need to update
your tree and rebuild, or (if you don't build your Emacs yourself)
find a newer build.

> As the subject line says, presumably the salient point is that ^? has
> bidi-class BN.  But that's really an assumption on my part.

The problems I solved in May were not due to bidi type of the
characters, but to something much more mundane: the fact that control
characters are displayed by 2 symbols, like ^X, as opposed to normal
characters that take only one screen position.  The bidi-aware code
which positions the cursor was tripping on that case.

> (BTW, it would be nice for this variable's doc to start with an asterisk
> so you could set it with M-x set-variable.)

Sorry, I don't want to do this.  bidi-display-reordering is an
internal variable, not something I'd like users to play with at will.
It will become non-nil by default soon, so having to set it manually
is just a temporary measure, intended to get me off the hook of most
of Emacs users while the bidi support is still in diapers ;-)



reply via email to

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