From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86edds36cw.fsf@gnu.org> References: <93fcc2d3-f808-42d7-b31e-a88522986989@gmail.com> <834jfgf984.fsf@gnu.org> <87zfx8ru7c.fsf@localhost> <8334v0f4s7.fsf@gnu.org> <87cyu4rn8u.fsf@localhost> <83y1csdkrg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16972"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68446@debbugs.gnu.org To: yantar92@posteo.net, thamer.mahmoud@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 04 10:52:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rWZAm-0004Df-Sm for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Feb 2024 10:52:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWZAH-0007lq-Rc; Sun, 04 Feb 2024 04:51:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWZAF-0007lZ-Uc for bug-gnu-emacs@gnu.org; Sun, 04 Feb 2024 04:51:52 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rWZAE-0008Au-KO for bug-gnu-emacs@gnu.org; Sun, 04 Feb 2024 04:51:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWZAP-0002Zr-U9 for bug-gnu-emacs@gnu.org; Sun, 04 Feb 2024 04:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Feb 2024 09:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68446 X-GNU-PR-Package: emacs Original-Received: via spool by 68446-submit@debbugs.gnu.org id=B68446.17070402959875 (code B ref 68446); Sun, 04 Feb 2024 09:52:01 +0000 Original-Received: (at 68446) by debbugs.gnu.org; 4 Feb 2024 09:51:35 +0000 Original-Received: from localhost ([127.0.0.1]:48192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWZ9z-0002ZD-6P for submit@debbugs.gnu.org; Sun, 04 Feb 2024 04:51:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWZ9w-0002Yz-Po for 68446@debbugs.gnu.org; Sun, 04 Feb 2024 04:51:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWZ9d-00085k-DR; Sun, 04 Feb 2024 04:51:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=gVPZ+dcsMhnVcBM0lkuaiBAVSPwTTv/YBijZLp2pQM4=; b=rOw91y9Yamfj kP79H5WzyiZGdHArh7jc6lMC9EZOCKmBuTlBGHEcbPZTfHK+vJRjFoAAGvq9UVAdK4LkF7caKEKMj I3xOenukYXGOa04yM6Vmrh5eNzDfq+G0ZicFIed4rNXGUg070uRsPVNaT+GQMiDSlsxQ67cL0WHgL UHsnT3RXdIj43BmUd+ejVeKAwRrAits1RxOklD0Cd/Ia372EaNDQ+COI8FS7o/cD4XV6j6qKV0khF CNVe9UMmNTJ/s+r1gQLBiHN48dgblE39Ma7ZZWJqRJnF3kxwgqwedFMs2QD0FNdfnHD0DR1UKlKjx AAqLwsLAQuynN8e2zITW5A==; In-Reply-To: <83y1csdkrg.fsf@gnu.org> (message from Eli Zaretskii on Sun, 14 Jan 2024 16:58:43 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279400 Archived-At: > Cc: 68446@debbugs.gnu.org, thamer.mahmoud@gmail.com > Date: Sun, 14 Jan 2024 16:58:43 +0200 > From: Eli Zaretskii > > > From: Ihor Radchenko > > Cc: thamer.mahmoud@gmail.com, 68446@debbugs.gnu.org > > Date: Sun, 14 Jan 2024 14:41:21 +0000 > > > > Eli Zaretskii 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.