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#69384: 30.0.50; :align-to and bidi-paragraph-direction interaction Date: Sun, 25 Feb 2024 19:35:22 +0200 Message-ID: <86h6hwwip1.fsf@gnu.org> References: <87a5no1pka.fsf@gmx.net> <86o7c4wkwb.fsf@gnu.org> <874jdw1n0w.fsf@gmx.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14844"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69384@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 25 19:41:22 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 1reJRC-0003cy-Cj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Feb 2024 19:41:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reJQX-0007hN-4b; Sun, 25 Feb 2024 13:40:41 -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 1reJQW-0007gf-1i for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 13:40:40 -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 1reJQV-0000S1-Pp for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 13:40:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reJQu-0001Dw-JK for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 13:41:04 -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, 25 Feb 2024 18:41:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69384 X-GNU-PR-Package: emacs Original-Received: via spool by 69384-submit@debbugs.gnu.org id=B69384.17088864244507 (code B ref 69384); Sun, 25 Feb 2024 18:41:04 +0000 Original-Received: (at 69384) by debbugs.gnu.org; 25 Feb 2024 18:40:24 +0000 Original-Received: from localhost ([127.0.0.1]:37950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reJQG-0001AW-AQ for submit@debbugs.gnu.org; Sun, 25 Feb 2024 13:40:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reIvk-00083p-FW for 69384@debbugs.gnu.org; Sun, 25 Feb 2024 13:08:52 -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 1reIPO-00079b-Jl; Sun, 25 Feb 2024 12:35:26 -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=N4D2c9bTc9KAUvUzdCL8td7cGjlVV4o8bVP7bdX2iYo=; b=f4q/LPJKbrrc TVAg9ngqPAAMzMrEJeT6z2IZKPV3/9u4AWLSPm0oiHPo9SD/ptXq7rgMUk5sGKJ32goE6viS7O+4C b1L9wzQZNY9514QQJQoF1I7QzunN2IJmZ5RY0E3zl1PpOgHVNurtZcXFEhxxlKsiLL/EdZ9uzXuZA 3B0izmWMejsQnapemsWqeTdBXkNXcXGmGiVaz7+wz6JS6RA22IoG0iKSir9xy+q6KBgqTuJe4cFz+ O62YcwEmsO95JeWIaCYhWlOyXg9LxtdVUymiFEV0GkFYlC1byTs39hJEEjV41Uiuh3q29gdoLniOf nJEoEBfuduVqiWa3K05sZg==; In-Reply-To: <874jdw1n0w.fsf@gmx.net> (message from Stephen Berman on Sun, 25 Feb 2024 18:17:35 +0100) 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:280637 Archived-At: > From: Stephen Berman > Cc: 69384@debbugs.gnu.org > Date: Sun, 25 Feb 2024 18:17:35 +0100 > > >> 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. > > This is also what I expected. But it would be nice if there were an > easier way to calculate the value of :align-to (I looked in the Elisp > manual but didn't find anything that would give me the value 0.75 I > found by trial and error). I don't understand well enough what were you trying to achieve, so I cannot suggest how to do that. > >> 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? > > I wanted to align to the first column (0) in LTR order, for which it's > necessary set bidi-paragraph-direction to 'left-to-right. The resulting > alignment is what I wanted and expected, but the broken shaping is not. What do you mean by "first column (0) in LTR order"? D|o you mean the leftmost column in the visual order? something else? > > Still, I don't think I understand what are you reporting as a bug > > here. Please clarify. > > Sorry for not being clearer in my report: the bug is the broken shaping > with the combination of setting bidi-paragraph-direction and using > :align-to OK, I will look into that when I have time. > the first two examples were meant to show that using these > individually also works. But I gather from your reply that I've > misunderstood what :align-to set to 0 means; can you enlighten me? It's supposed to be a no-op, of course. Exactly like in the strict LTR unidirectional text. What else can it mean?