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#22786: 25.1.50; eww arabic rendering Date: Fri, 26 Feb 2016 10:59:56 +0200 Message-ID: <83povjetir.fsf@gnu.org> References: <84fuwjca8b.fsf@gmail.com> <8760xeq5kj.fsf@gnus.org> <84y4aaza45.fsf@gmail.com> <87egc1z71n.fsf@gnus.org> <83wppsg4yj.fsf@gnu.org> <87d1rkvxbx.fsf@gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1456477293 29428 80.91.229.3 (26 Feb 2016 09:01:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 09:01:33 +0000 (UTC) Cc: 22786@debbugs.gnu.org, mohamed.hibti@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 10:01:21 2016 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 1aZEH1-00042q-DY for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 10:01:19 +0100 Original-Received: from localhost ([::1]:48206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZEGv-0003Uh-Qu for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 04:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZEGo-0003UM-MS for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 04:01:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZEGk-0007wo-Lp for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 04:01:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZEGk-0007wO-JW for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 04:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZEGj-00025w-SU for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 04:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2016 09:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22786-submit@debbugs.gnu.org id=B22786.14564772207996 (code B ref 22786); Fri, 26 Feb 2016 09:01:01 +0000 Original-Received: (at 22786) by debbugs.gnu.org; 26 Feb 2016 09:00:20 +0000 Original-Received: from localhost ([127.0.0.1]:46850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZEG1-00024r-4M for submit@debbugs.gnu.org; Fri, 26 Feb 2016 04:00:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42811) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZEFw-00024b-3p for 22786@debbugs.gnu.org; Fri, 26 Feb 2016 04:00:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZEFn-0007lc-3u for 22786@debbugs.gnu.org; Fri, 26 Feb 2016 04:00:07 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZEFm-0007lY-W8; Fri, 26 Feb 2016 04:00:03 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1989 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aZEFl-0007eA-Ja; Fri, 26 Feb 2016 04:00:02 -0500 In-reply-to: <87d1rkvxbx.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 26 Feb 2016 16:15:38 +1030) 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:113859 Archived-At: > From: Lars Ingebrigtsen > Cc: mohamed.hibti@gmail.com, 22786@debbugs.gnu.org > Date: Fri, 26 Feb 2016 16:15:38 +1030 > > > I think at this stage we should add to the eww menu an item that > > allows to change the page direction, and let users override the > > default if needed. This should solve most, if not all, of the cases > > where the default doesn't DTRT. > > Well, Firefox displays the web page correctly without Firefox users > having to do anything in particular, so presumably eww should be able to > do the same, I would have thought? EWW has a long way to go until it becomes a fair runner-up for Firefox. With all due respect. E.g., our layout is nowhere as pretty as Firefox, see how we display a typical Wikipedia page. I think the catastrophic results of rendering the likes of "Other languages" part of a Wikipedia page with Arabic the first language in the list are much worse than an occasional need to switch the page direction: the former affects _all_ Emacs users, while the latter affects only those who frequently browse RTL pages. > That is, eww should leave `bidi-paragraph-direction' to nil (which makes > the Al Jazeera web page display correctly), and then it... shouldn't be > so eager to switch the direction of paragraphs to rtl just because a > section starts with some rtl text. Or something. If you can come up with that magical "something", i.e. point out some HTML tag or something else on the page that could be a hint for us not to switch paragraph direction, then we can do that. I will be happy to help with the details. But if there's no such hint, and all we have is the text itself, then the UBA determines the paragraph direction from the first strong directional character, and we then keep that direction until the paragraph ends, which is indicated by an empty line. There's no way around this, it's how the bidirectional display engine works. Specifically, we need a way to distinguish between the list of languages on a Wikipedia page from the Al Jazeera home page. Can you spot anything in the page sources that will allow such a distinction? In any case, I think it will be good to add a "Switch page direction" menu item to EWW on the emacs-25 branch.