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: Mon, 28 Dec 2015 17:40:43 +0100 Message-ID: <87twn2il10.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1451320878 15251 80.91.229.3 (28 Dec 2015 16:41:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2015 16:41:18 +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 Mon Dec 28 17:41: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 1aDar8-0006rl-DA for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 17:41:10 +0100 Original-Received: from localhost ([::1]:45076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDar7-0008MB-DR for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 11:41:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDar3-0008M4-IS for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 11:41:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDar0-00035k-CG for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 11:41:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDar0-00035g-8Q for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 11:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aDar0-0002rE-46 for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2015 11:41: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: Mon, 28 Dec 2015 16:41: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.145132085210962 (code B ref 22250); Mon, 28 Dec 2015 16:41:02 +0000 Original-Received: (at 22250) by debbugs.gnu.org; 28 Dec 2015 16:40:52 +0000 Original-Received: from localhost ([127.0.0.1]:46600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDaqq-0002qk-3P for submit@debbugs.gnu.org; Mon, 28 Dec 2015 11:40:52 -0500 Original-Received: from odoacer.turtle-trading.net ([217.91.34.180]:48702) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDaqo-0002qW-9O for 22250@debbugs.gnu.org; Mon, 28 Dec 2015 11:40:50 -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 1aDaqh-0001dw-F4; Mon, 28 Dec 2015 17:40:43 +0100 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.84) (envelope-from ) id 1aDaqh-0001Eg-CO; Mon, 28 Dec 2015 17:40:43 +0100 In-Reply-To: <83k2nzfdt9.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 28 Dec 2015 05:32:34 +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:110895 Archived-At: Eli Zaretskii writes: > Does the patch below fix the problem? Sorry, no, no change here with that.=20 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. But Emacs' line wrap is only active with truncate-lines=3Dnil, and truncate-lines is set to t in eww-mode. When I set truncate-lines=3Dnil in shr-insert-document the bug does actually go away. I do not know why truncate-lines was set to t in the first place, though, and where that may have other consequences. I'm wondering why this bug depends on RTL layout. I tried my test case without dir=3Drtl and with "abc" as text, but that works fine, so RTL really is a factor. But that's not right, is it? Conceptually, the linebreak opportunities should be the same regardless of the paragraph direction, RTL or LTR. For mixed text the visual order of the runs for should be different for RTL paragraphs, but even than the length of the lines and where they are broken should not change. Line breaks should be found according to logical ordering. Let's say I have: aaa bbb =D7=90=D7=90=D7=90 =D7=91=D7=91=D7=91 If I have to break it before the last word, I want to get: aaa bbb =D7=90=D7=90=D7=90 =D7=91=D7=91=D7=91 And indeed, fill-paragraph does the right thing with this example. If I narrow my Emacs window here, it breaks like this, though: aaa bbb =D7=91=D7=91=D7=91 =D7=90=D7=90=D7=90 So there seems to be an even bigger issue in Emacs generally? At least Emacs default wrapping behaviour seems not directly usable as a basis for filling paragraphs correctly.