all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: nisse@lysator.liu.se (Niels Möller)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 43207@debbugs.gnu.org
Subject: bug#43207: 26.3; Strange bidi behavior
Date: Sat, 05 Sep 2020 08:46:51 +0200	[thread overview]
Message-ID: <cpfy2lora90.fsf@fukushima.lysator.liu.se> (raw)
In-Reply-To: <835z8tqpha.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Sep 2020 23:03:13 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> It is not a bug, but the expected behavior.  The display of
> bidirectional text is affected by the "base paragraph direction", and
> in Emacs paragraphs are separated by empty lines.  Since there's no
> empty line between the Arabic text and the following lines of Latin
> text, that Latin text "inherits" the base paragraph direction of
> right-to-left, set by the line that has only the Arabic text.

Thanks for the explanation. So if the base paragraph direction is
right-to-left, then right arrow is supposed to move logical backwards,
like C-b.

> You can either insert an empty line between that Arabic line, 

Is there any way to tell emacs that a new paragraph starts, without
inserting anything visible in the buffer? Some special unicode
character, or emacs text property?

> But this is how most bidi-supporting applications out there behave.

For what it's worth, display in firefox works differently. The line of
arabic text is right-to-left and right-justified on the screen, but
following lines are left-to-right, more like what I expected. So it
seems to use a different parapgraph heuristics than emacs.

> If you prefer the arrow keys to move the cursor visually, you can do
>
>   M-x set-variable RET visual-order-cursor-movement RET t RET
>
> (This is also in the manual.)

I was also able to find this setting via the documentation for
left-char/right-char. That's nice.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.





  parent reply	other threads:[~2020-09-05  6:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 19:36 bug#43207: 26.3; Strange bidi behavior Niels Möller
2020-09-04 20:03 ` Eli Zaretskii
2020-09-05  0:09   ` Stefan Kangas
2020-09-05  6:46   ` Niels Möller [this message]
2020-09-05  7:35     ` 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

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

  git send-email \
    --in-reply-to=cpfy2lora90.fsf@fukushima.lysator.liu.se \
    --to=nisse@lysator.liu.se \
    --cc=43207@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.