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 05:32:34 +0200 Message-ID: <83k2nzfdt9.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1451273608 9398 80.91.229.3 (28 Dec 2015 03:33:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2015 03:33:28 +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 04:33:12 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 1aDOYa-00030l-3g for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 04:33:12 +0100 Original-Received: from localhost ([::1]:43469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDOYZ-0005D0-B2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Dec 2015 22:33:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDOYV-0005Ci-C0 for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 22:33:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDOYQ-0006Ac-K3 for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 22:33:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDOYQ-0006AS-Gr for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 22:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aDOYQ-0007cm-7j for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 22:33: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 03:33: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.145127353029245 (code B ref 22250); Mon, 28 Dec 2015 03:33:02 +0000 Original-Received: (at 22250) by debbugs.gnu.org; 28 Dec 2015 03:32:10 +0000 Original-Received: from localhost ([127.0.0.1]:45237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDOXZ-0007bc-R8 for submit@debbugs.gnu.org; Sun, 27 Dec 2015 22:32:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49086) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDOXU-0007b3-NW for 22250@debbugs.gnu.org; Sun, 27 Dec 2015 22:32:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDOXM-0005s2-7s for 22250@debbugs.gnu.org; Sun, 27 Dec 2015 22:31:59 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDOXB-0005my-Df; Sun, 27 Dec 2015 22:31:45 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3615 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aDOXA-0000kP-Nr; Sun, 27 Dec 2015 22:31:45 -0500 In-reply-to: <8760zjbi9s.fsf@justinian.turtle-trading.net> (message from Benjamin Riefenstahl on Mon, 28 Dec 2015 00:09:51 +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:110885 Archived-At: > From: Benjamin Riefenstahl > Cc: 22250@debbugs.gnu.org, Lars Ingebrigtsen > Date: Mon, 28 Dec 2015 00:09:51 +0100 > > I experimented a bit and I can't quite exactly say what is needed to > cause the problem. The same file/URL has it and than again not when I > try again. It seems that "g" usually fixes it, while "G RET" usually > reproduces it, if it has happend with that particular file/URL before. > It also seems that the length of the URL has an impact, probably because > it is shown at the top of the frame and during loading of the URL (as in > "Loading http[...]"). It seems to require that the URL is longer than > the frame width. > > I have no sure recipe using a file, but I have something based on a > simple 10-line HTTP server look-alike, see attachments. Put the files > in some directory, make the script executable, execute it, and call EWW > with the URL > http://127.0.0.1:1234/abc/abc/abc/abc/abc/abc/abc/abc/abc/abc/abc/abc/. > If it looks good on the first call, try "G RET", than it reliably > exhibits the problem for me. I even get it with "emacs -Q -nw". Note > that the script depends on netcat and different versions of netcat use > different options to run a server, so the script may not work as-is for > you. Does the patch below fix the problem? Lars, we don't seem to have a test suite for eww or shr, so if you have some layout tests, including with the indentation you explained above, could you try with this patch and see if anything breaks? Thanks. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c28e0b8..f7da3e9 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -244,7 +244,8 @@ shr-insert-document (if (and (null shr-width) (not (shr--have-one-fringe-p))) (* (frame-char-width) 2) - 0)))))) + 0))))) + bidi-display-reordering) (shr-descend dom) (shr-fill-lines start (point)) (shr-remove-trailing-whitespace start (point))