From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22250: 25.0.50; Eww fails to break RTL paragraph Date: Mon, 28 Dec 2015 20:30:51 +0200 Message-ID: <8360zifmsk.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1451327484 25691 80.91.229.3 (28 Dec 2015 18:31:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2015 18:31:24 +0000 (UTC) Cc: 22250@debbugs.gnu.org, larsi@gnus.org To: Benjamin Riefenstahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 28 19:31:13 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 1aDcZb-0002p2-No for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 19:31:12 +0100 Original-Received: from localhost ([::1]:45797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDcZb-0000Yl-0S for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 13:31:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDcZW-0000YW-3P for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 13:31:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDcZS-0003Ic-C6 for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 13:31:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDcZS-0003IW-8h for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 13:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aDcZS-0007A9-50 for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 13:31: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: Mon, 28 Dec 2015 18:31: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.145132742727480 (code B ref 22250); Mon, 28 Dec 2015 18:31:02 +0000 Original-Received: (at 22250) by debbugs.gnu.org; 28 Dec 2015 18:30:27 +0000 Original-Received: from localhost ([127.0.0.1]:46677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDcYs-000799-6q for submit@debbugs.gnu.org; Mon, 28 Dec 2015 13:30:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39031) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDcYn-00078r-5j for 22250@debbugs.gnu.org; Mon, 28 Dec 2015 13:30:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDcYe-000329-NY for 22250@debbugs.gnu.org; Mon, 28 Dec 2015 13:30:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDcYU-0002yJ-Kx; Mon, 28 Dec 2015 13:30:02 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3999 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aDcYT-0008Vm-Qa; Mon, 28 Dec 2015 13:30:02 -0500 In-reply-to: <87k2nyigmh.fsf@justinian.turtle-trading.net> (message from Benjamin Riefenstahl on Mon, 28 Dec 2015 19:15:50 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:110910 Archived-At: > From: Benjamin Riefenstahl > Cc: 22250@debbugs.gnu.org, larsi@gnus.org > Date: Mon, 28 Dec 2015 19:15:50 +0100 > > >> Eli Zaretskii writes: > >> > Does the patch below fix the problem? > > >> From: Benjamin Riefenstahl > >> Sorry, no, no change here with that. > > Eli Zaretskii writes: > > ??? It certainly solved the problem with your original HTML file > > visited with eww-open-file. Doesn't it solve that for you? Are you > > sure you tested correctly? And what exactly did you test? > > Ah, I'm sorry, I forgot about that one, my bad. You are right, my first > test case is indeed fixed by your patch. I'm relieved. Thanks. > Just my actual problem is not, including the last script-based test case > I made. (Which I was working on the whole evening yesterday :-() Is there any way of recreating that problem without having to set up netcat? (Why is receiving a page from a server different from visiting the same page as a disk file? The way shr works, this should produce exactly the same results, no?) > >> I looked at the code though and I noticed the call stack > >> > >> shr-fill-line > >> -> shr-vertical-motion > >> -> vertical-motion > >> > >> which is used to find the line break point. It seems the idea here is > >> that Emacs' normal line wrap is used, we just go one line down, and > >> vertical-motion gets us to the place where Emacs has wrapped. > > > > No, that's not how this works, AFAIK. (But Lars can correct me if I'm > > wrong.) What it does is go to the column where it wants to wrap and > > then checks if it's at EOL. If not, it goes back and looks for a > > place to insert a newline. Rinse, repeat. > > Fact is that vertical-motion is called in the course of determining the > break (I think as part of "go to the column where it wants to wrap") Yes, but vertical-motion is only used here to go to a particular column on the same line. It never goes down or up. How's that related to wrapping lines? > and that my actual problems and the script test case seem to be > solved by setting truncate-lines to nil. I understand, but that doesn't yet explain what exactly doesn't work correctly. I'm pretty sure that the code which is responsible is not in shr-fill-line, because when that runs, the bidi reordering is disabled by my patch. > We have two different bugs here, because my first test case is *not* > fixed just by setting truncate-lines to nil. Yes. The question is where is the other code. Can you spot that? Failing that, can you describe what exactly do you see, or maybe step through the code in Edebug and tell which part(s) misbehave?