unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 69384@debbugs.gnu.org
Subject: bug#69384: 30.0.50; :align-to and bidi-paragraph-direction interaction
Date: Sun, 25 Feb 2024 18:47:48 +0200	[thread overview]
Message-ID: <86o7c4wkwb.fsf@gnu.org> (raw)
In-Reply-To: <87a5no1pka.fsf@gmx.net> (bug-gnu-emacs@gnu.org)

> Date: Sun, 25 Feb 2024 17:22:45 +0100
> From:  Stephen Berman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> In a buffer that contains bidirectional text, setting
> bidi-paragraph-direction to 'left-to-right aligns the RTL text with the
> left margin like the LTR text; see the first sexp below and the top
> buffer in the attached screenshot.

Yes, and that's what you should expect.  That's what
bidi-paragraph-direction set to left-to-right means: the base
paragraph direction of every paragraph in this buffer will be LTR.  If
you think this is a bug or unexpected, please tell why.

> Another alternative to get this alignment is to leave
> bidi-paragraph-direction at its default value of nil and use a space
> display specification with a suitable value for the :align-to property,
> but this requires a calculation that seems to depend at least on the
> font used and the values of `window-width' and `string-width' for the
> string used (or the corresponding pixel-width values); see the second
> sexp below and the middle buffer in the attached screenshot.

Yes, because in a RTL paragraph, columns are counted from the right
edge of the window.  So this again is the expected behavior, and if
you consider that unexpected, please explain why.

> It's also possible to avoid this calculation and use an :align-to value
> of 0 in combination with setting bidi-paragraph-direction to
> 'left-to-right;

What is the purpose of using ":align-to 0"? what do you think is the
semantics of that and your expectations?

> see the third sexp below and the bottom buffer in the
> attached screenshot.  However, as the screenshot shows, this last
> alternative breaks Arabic text shaping, at least for the fonts I tried

I will look into the shaping problem, but in general 'display' specs
do affect bidirectional display; see the end of the node "Specified
Space" in the ELisp manual.

Still, I don't think I understand what are you reporting as a bug
here.  Please clarify.





  reply	other threads:[~2024-02-25 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 16:22 bug#69384: 30.0.50; :align-to and bidi-paragraph-direction interaction Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 16:47 ` Eli Zaretskii [this message]
2024-02-25 17:17   ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 17:35     ` Eli Zaretskii
2024-02-25 18:26       ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 19:45         ` Eli Zaretskii
2024-02-25 21:18           ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-26 12:41             ` Eli Zaretskii
2024-02-26 14:12               ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-26 17:28       ` Eli Zaretskii
2024-02-26 21:46         ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-27  7:44           ` 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=86o7c4wkwb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69384@debbugs.gnu.org \
    --cc=stephen.berman@gmx.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).