Subject: bug#69384: 30.0.50; :align-to and bidi-paragraph-direction interaction

From: Stephen Berman <[email-masked]>
Date: Mon, 26 Feb 2024 15:12:25 +0100

On Mon, 26 Feb 2024 14:41:32 +0200 Eli Zaretskii <[email-masked]> wrote:

>> From: Stephen Berman <[email-masked]>
>> Cc: [email-masked]
>> Date: Sun, 25 Feb 2024 22:18:10 +0100
>> 
>> > Sorry, this is still too vague.  What do you mean by "RTL text aligned
>> > with LTR text"? "aligned" in what way and sense?
>> >
>> > How about an example of text showing what you want to do?  To avoid
>> > strange effects of bidi reordering, please use lower-case letters to
>> > represent LTR text and upper-case letters to represent RTL text.
>> 
>> The screenshot in my first post in this bug shows the alignment I want:
>> the last (i.e. leftmost) character of the Arabic string occupies the
>> same horizontal position (in this case, the leftmost column) as the
>> first (i.e. leftmost) character of the English string.
>
> Then why not use something like this:
>
>   (let* ((a "السّلام عليكم")
> 	 (b "Hello")
> 	 (buf (get-buffer-create "Test1")))
>     (with-current-buffer buf
>       (erase-buffer)
>       (setq bidi-paragraph-direction 'left-to-right)
>       (insert "      " a
> 	      "\n\n"
> 	      "      " b)
>       (switch-to-buffer buf)))
>
> IOW, align with spaces and TABs.

🤦 As so often, the obvious solution is only obvious after it's shown to
you....  Thanks.

Steve Berman