GNU bug report logs - #68446
29.1.90; Bidi right-to-left paragraphs missing text in Org mode

Previous Next

Package: emacs;

Reported by: Thamer Mahmoud <thamer.mahmoud <at> gmail.com>

Date: Sun, 14 Jan 2024 10:23:01 UTC

Severity: normal

Found in version 29.1.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: yantar92 <at> posteo.net, thamer.mahmoud <at> gmail.com
Cc: 68446 <at> debbugs.gnu.org
Subject: bug#68446: 29.1.90; Bidi right-to-left paragraphs missing text in Org mode
Date: Sun, 04 Feb 2024 11:51:11 +0200
> Cc: 68446 <at> debbugs.gnu.org, thamer.mahmoud <at> gmail.com
> Date: Sun, 14 Jan 2024 16:58:43 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Ihor Radchenko <yantar92 <at> posteo.net>
> > Cc: thamer.mahmoud <at> gmail.com, 68446 <at> debbugs.gnu.org
> > Date: Sun, 14 Jan 2024 14:41:21 +0000
> > 
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> > 
> > >> May you please elaborate? I do not see anything unexpected in the text
> > >> properties that Org mode applies to the link and the letter "a".
> > >
> > > ...
> > > If you describe in enough details how the [[link]] thing is handled by
> > > Org, maybe I could elaborate more than the general observations and
> > > questions above.
> 
> Actually, I think I see the reason, and the problem is indeed in the
> display code's logic in this case.

There was an algorithmic flaw in handling invisible property when the
invisible text starts inside embedding level above the base paragraph
level: the code failed to account for the "backward" iteration which
is part of the bidi reordering, and instead always looked forward for
the first visible position.

> > Let's simplify the reproducer, getting rid of Org mode:
> > 
> > (let ((str (concat "a " (propertize "[" 'invisible t) "b" (propertize "]" 'invisible t))))
> >   (with-temp-buffer
> >     (display-buffer (current-buffer))
> >     (insert str)
> >     (read-char "'a b' is visible. Press any key.")
> >     (setq bidi-paragraph-direction 'right-to-left)
> >     (read-char "'a b' is invisible. Press any key.")))
> > 
> > Is this the above expected?
> 
> No.

Should be fixed now on the master branch.




This bug report was last modified 1 year and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.