Subject: bug#9229: 24.0.50; Bidi problem with `cursor' property

From: Johan Bockgård <[email-masked]>
Date: Wed, 03 Aug 2011 22:03:51 +0200

Eli Zaretskii <[email-masked]> writes:

>> Date: Wed, 03 Aug 2011 19:19:45 +0300
>> From: Eli Zaretskii <[email-masked]>
>> Cc: [email-masked]
>> 
>> > From: Johan Bockgård <[email-masked]>
>> > Date: Wed, 03 Aug 2011 16:29:52 +0200
>> > 
>> > 
>> >     (let ((o (make-overlay (point-max) (point-max)))
>> >           (s (make-string (+ 5 (window-width)) ?-)))
>> >       (put-text-property 0 1 'cursor t s)
>> >       (overlay-put o 'after-string s)
>> >       (goto-char (point-max)))
>> > 
>> > The cursor is expected to be displayed before the overlay, but is
>> > displayed after it.
>> > 
>> > (This bug makes icomplete-mode very confusing to use.)
>
> Does the patch below give good results?  If it solves this particular
> problem, please try it in your regular use for a day or two, and see
> if there are any adverse effects.  If you don't spot any trouble, I
> will install this on the trunk.

Apparently, the patch only tries to fix the case where "the entire line
is from display string", which doesn't solve the icomplete problem:

emacs -Q

M-x icomplete-mode RET

M-x a