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 18:47:48 +0200 Message-ID: <86o7c4wkwb.fsf@gnu.org> References: <87a5no1pka.fsf@gmx.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23891"; 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 17:49:09 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 1reHgb-0005wS-Gy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Feb 2024 17:49:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reHg6-0006Zi-E8; Sun, 25 Feb 2024 11:48:38 -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 1reHg5-0006ZZ-W1 for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 11:48:38 -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 1reHg5-0005zz-O6 for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 11:48:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reHgU-000487-GB for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 11:49:02 -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 16:49:02 +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.170887970515605 (code B ref 69384); Sun, 25 Feb 2024 16:49:02 +0000 Original-Received: (at 69384) by debbugs.gnu.org; 25 Feb 2024 16:48:25 +0000 Original-Received: from localhost ([127.0.0.1]:58597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reHft-00043b-3e for submit@debbugs.gnu.org; Sun, 25 Feb 2024 11:48:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reHfr-00042m-FL for 69384@debbugs.gnu.org; Sun, 25 Feb 2024 11:48:24 -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 1reHfL-0005s5-En; Sun, 25 Feb 2024 11:47:52 -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=FCDgkdWoP+pJbOJabrAHIS4Axmj29Rv9vPIN8sAbhko=; b=dtKCpwFAU1Rb x18c0qNAkPuLidrWDIdjJ+Cx85akIH7Ev6Lrhfl+sJOQGq33jysp4W9RwDa+IzlJVwmQhccP3x2yf LyPmdupk5Ct7iJ13RoatmIME7XWvDnG0rbwV8kdXAFwJXSgQARRDZ+3fp5LPth/G291I930RNEdCk pddFUMT95u+dd/IfadxYCzk7foDjcpGoTRHpm4Xi5xPM0M429GjjsskMLYRA1SPPmTTcb41zVqIlu CWc5GxDtPwyHJ2GaKTpdfFQj3Zaq9a4780RmDo5cgd54yFjUc1VNNEWUfIvZwzLKrUy/gJPZkwl/m dFmmeAAT4Z5ZuKKgIRkJpQ==; In-Reply-To: <87a5no1pka.fsf@gmx.net> (bug-gnu-emacs@gnu.org) 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:280623 Archived-At: > 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" > > 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.