From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#22250: 25.0.50; Eww fails to break RTL paragraph Date: Tue, 29 Dec 2015 23:33:33 +0100 Message-ID: <87y4cc996q.fsf@justinian.turtle-trading.net> References: <8760zj3dvr.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me> <83twn3g0ac.fsf@gnu.org> <8760zjbi9s.fsf@justinian.turtle-trading.net> <83k2nzfdt9.fsf@gnu.org> <87twn2il10.fsf@justinian.turtle-trading.net> <83bn9afqfz.fsf@gnu.org> <87k2nyigmh.fsf@justinian.turtle-trading.net> <8360zifmsk.fsf@gnu.org> <8737umi7xw.fsf@justinian.turtle-trading.net> <83io3hdwwg.fsf@gnu.org> <87a8ot9dqb.fsf@justinian.turtle-trading.net> <83poxpc6hz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451428460 32384 80.91.229.3 (29 Dec 2015 22:34:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2015 22:34:20 +0000 (UTC) Cc: 22250@debbugs.gnu.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 29 23:34:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aE2qI-0005kT-Od for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 23:34:11 +0100 Original-Received: from localhost ([::1]:50458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE2qI-0002oZ-3l for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 17:34:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE2qD-0002np-PG for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 17:34:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aE2qA-0002nw-JA for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 17:34:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE2qA-0002ns-F6 for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 17:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aE2qA-0006DC-AO for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 17:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Dec 2015 22:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22250 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 22250-submit@debbugs.gnu.org id=B22250.145142842223850 (code B ref 22250); Tue, 29 Dec 2015 22:34:02 +0000 Original-Received: (at 22250) by debbugs.gnu.org; 29 Dec 2015 22:33:42 +0000 Original-Received: from localhost ([127.0.0.1]:49018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE2pp-0006Cc-Vj for submit@debbugs.gnu.org; Tue, 29 Dec 2015 17:33:42 -0500 Original-Received: from odoacer.turtle-trading.net ([217.91.34.180]:50337) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE2po-0006CL-2K for 22250@debbugs.gnu.org; Tue, 29 Dec 2015 17:33:40 -0500 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1aE2ph-0002jU-FR; Tue, 29 Dec 2015 23:33:33 +0100 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.84) (envelope-from ) id 1aE2ph-000210-CM; Tue, 29 Dec 2015 23:33:33 +0100 In-Reply-To: <83poxpc6hz.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 29 Dec 2015 23:03:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110990 Archived-At: >> Benjamin Riefenstahl writes: >> On practical level, there is still the matter of paragraphs using >> diacritics. Eli Zaretskii writes: > Is that the only remaining problem? At this point every problem in my application and test cases that I still see involves diacritics. And thank you (and Lars) for your patience with that. > Or does this mean my suggestion didn't work, and is not required, It does fix the issue with my first test case, with the Latin text in an RTL document. I just checked and that one does not work if I revert your change on HEAD. Your change did not fix the issue with Hebrew text without diacritics, that got fixed with Lars' commit 03dbfb9. >> I'm still concerned about the behaviour of vertical-motion in this, >> though. > Reading the rest of your message, I'm not sure. I am weary that there still are dragons with vertical-motion and/or hscroll. I don't like it that two situations behave differently, although they have the same values in variables and the same window configuration, point at in same place, and - from what I can see - horizontal scrolling also at the same level (given that point is at bol, hscroll *should* be 0, otherwise point would not be visible, right?). Still window-hscroll gives a bogus value in the bad case. >> With both variables set in shr-insert-document, I consistently get a >> seemingly correctly wrapped but left justified (LTR) paragraph, >> regardless which version I use, I tried in 5049827 (the one before >> 03dbfb9) and with the current 88e2de2. This is with the above >> mentioned URL. > Does this mean there's one more problem? Not with my application and test cases. But it seems to me, that contrary to what you believed, bidi-paragraph-direction=nil still does have an effect on the layout, even when bidi-display-reordering is nil. It fixes the paragraph wrapping for Hebrew text without diacritics in the version before Lars commit, while bidi-display-reordering alone does not. It also makes the paragraph LTR, but that does not surprise me as much. An insight that I just had - you maybe are aware of it already - is that shr-tag-html, the function that sets bidi-paragraph-direction from the element, is called from with-in the body of shr-insert-document (as a subroutine of the recursive shr-descend, basically). That explains why Lars' patch (resetting bidi-paragraph-direction at the eww level each time before calling into shr) and setting bidi-paragraph-direction in shr-insert-document have the same effect on the wrapping. It also explains why we get an LTR paragraph, when we shadow the buffer-local variable in this way. And it explains why I got the problem only on "G RET". The problem was triggered between the start of the body of shr-insert-document and the call to shr-tag-html when bidi-paragraph-direction is right-to-left between those two places.