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 21:55:24 +0100 Message-ID: <87a8ot9dqb.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451422585 9281 80.91.229.3 (29 Dec 2015 20:56:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2015 20:56:25 +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 21:56:16 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 1aE1JU-00074B-2T for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 21:56:12 +0100 Original-Received: from localhost ([::1]:50105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE1JT-0003HQ-IW for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 15:56:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE1JP-0003H0-5l for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 15:56:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aE1JK-0002wr-EL for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 15:56:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE1JK-0002wm-Ah for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 15:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aE1JK-00026T-0d for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 15:56: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 20:56:01 +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.14514225348025 (code B ref 22250); Tue, 29 Dec 2015 20:56:01 +0000 Original-Received: (at 22250) by debbugs.gnu.org; 29 Dec 2015 20:55:34 +0000 Original-Received: from localhost ([127.0.0.1]:48961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE1Is-00025N-Hn for submit@debbugs.gnu.org; Tue, 29 Dec 2015 15:55:34 -0500 Original-Received: from odoacer.turtle-trading.net ([217.91.34.180]:50239) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE1Iq-000257-30 for 22250@debbugs.gnu.org; Tue, 29 Dec 2015 15:55:32 -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 1aE1Ii-0002gP-Vg; Tue, 29 Dec 2015 21:55:24 +0100 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.84) (envelope-from ) id 1aE1Ii-0007tY-Qy; Tue, 29 Dec 2015 21:55:24 +0100 In-Reply-To: <83io3hdwwg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 29 Dec 2015 18:47:43 +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:110983 Archived-At: Benjamin Riefenstahl writes: >> I have uploaded this now to my private webserver as >> . >> This URL reproduces the problem for me after "G RET". > Eli Zaretskii writes: > Not for me, it doesn't. I tried "G RET" quite a few times, it always > displays correctly. You're right it works now, since 03dbfb9 * (eww-setup-buffer): Restore left-to-right defaults Yesterday I had still been on the earlier f9d87dd. Oh the joy of moving targets ;-) But that's ok, so this case and my script text case are solved in practice. I'm still concerned about the behaviour of vertical-motion in this, though. On practical level, there is still the matter of paragraphs using diacritics. Do you have an idea how to fix those? For your other questions: >> In the bad case, for the first line, everything looks the same, >> vertical-motion gets called with the same parameter, but when it returns >> point is at 161. Which is not good. > > What does window-hscroll return in each of these two cases? I checked that again with the commit before 03dbfb9. I inserted a call to `message' to make sure I got the right window. It's 0 for the good case, 67 for the bad case. Basically the same as it->w->hscroll on the C level. >> In the good case, it->w->hscroll is 0, in the bad case it->w->hscroll is >> 68. >> Experimentation tells me that the interpretation of window-hscroll >> (whether it refers to the left or the right margin) depends on >> bidi-paragraph-direction, is that right? > > Yes and no. It depends on what you mean by "interpretation". I was starting from the doc on window.hscroll in window.h and the docstring for window-hscroll. The docstring says Return the number of columns by which WINDOW is scrolled from left margin. But with bidi-paragraph-direction set to RTL window-hscroll works with respect to the right margin. I just verified again. >> Note that at the point when vertical-motion is called and gives >> different answers, bidi-paragraph-direction is always right-to-left, so >> it looks like some window parameter that depends on >> bidi-paragraph-direction is cached somewhere? > > The value of bidi-paragraph-direction shouldn't matter when > bidi-display-reordering is nil (I've just went through the entire code > and didn't see any place where we use that value when > bidi-display-reordering is nil). But just in case I missed something, > try bindings bidi-paragraph-direction to nil or left-to-right where I > bind bidi-display-reordering, and see if that helps. 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. > P.S. I'm going to commit my patch, as it definitely improves things > and is clearly TRT to do (and I'm tired of stashing it ;-). Got it.