unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Thamer Mahmoud <thamer.mahmoud@gmail.com>,
	Ihor Radchenko <yantar92@posteo.net>
Cc: 68446@debbugs.gnu.org
Subject: bug#68446: 29.1.90; Bidi right-to-left paragraphs missing text in Org mode
Date: Sun, 14 Jan 2024 13:24:59 +0200	[thread overview]
Message-ID: <834jfgf984.fsf@gnu.org> (raw)
In-Reply-To: <93fcc2d3-f808-42d7-b31e-a88522986989@gmail.com> (message from Thamer Mahmoud on Sun, 14 Jan 2024 13:21:57 +0300)

> From: Thamer Mahmoud <thamer.mahmoud@gmail.com>
> Date: Sun, 14 Jan 2024 13:21:57 +0300
> 
> 1. In emacs -Q, create an empty buffer with Org mode active and type:
> 
> a [[link]]
> 
> 2. Evaluate: (setq bidi-paragraph-direction 'right-to-left)
> 3. Note the "a" and link are no longer visible.

I think it's an Org bug: it should prevent bidi reordering inside the
"[[link]]" string.  For example, wrap the "[[link]]" thing in LRO..PDF
bidi controls.  Because without that, the brackets can be mirrored by
bidi reordering and the BPA algorithm, and the link is no longer in
the form that Org expects.  The result is that the entire text becomes
invisible.

A work-around is to do one of the following:

  . insert one or more L2R characters after the "[[link]]", or
  . set bidi-inhibit-bpa to a non-nil value

I don't see an Emacs bug here, surprising as it may sound.  Lisp
programs that depend on particular sequence of characters on display
should be aware that bidi reordering can affect that.

Adding Ihor to the discussion.





  reply	other threads:[~2024-01-14 11:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-14 10:21 bug#68446: 29.1.90; Bidi right-to-left paragraphs missing text in Org mode Thamer Mahmoud
2024-01-14 11:24 ` Eli Zaretskii [this message]
2024-01-14 12:11   ` Ihor Radchenko
2024-01-14 13:00     ` Eli Zaretskii
2024-01-14 14:41       ` Ihor Radchenko
2024-01-14 14:58         ` Eli Zaretskii
2024-02-04  9:51           ` Eli Zaretskii
2024-02-04 13:10             ` Ihor Radchenko
2024-02-04 13:43               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834jfgf984.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68446@debbugs.gnu.org \
    --cc=thamer.mahmoud@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).