From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#22786: 25.1.50; eww arabic rendering Date: Tue, 01 Mar 2016 10:56:38 +1100 Message-ID: <87bn6z5avd.fsf@gnus.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> <83povjetir.fsf@gnu.org> <878u25xyk0.fsf@gnus.org> <831t7wc06e.fsf@gnu.org> <87vb582qk8.fsf@gnus.org> <837fho9ohr.fsf@gnu.org> <87twksxhed.fsf@gnus.org> <83ziuj8r4d.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456790302 3943 80.91.229.3 (29 Feb 2016 23:58:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 23:58:22 +0000 (UTC) Cc: 22786@debbugs.gnu.org, mohamed.hibti@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 01 00:58:11 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 1aaXha-0004ff-Pk for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Mar 2016 00:58:11 +0100 Original-Received: from localhost ([::1]:39834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaXhZ-0006WJ-JW for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 18:58:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaXhW-0006VB-4J for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 18:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaXhS-0007H1-01 for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 18:58:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaXhR-0007Gx-TE for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 18:58:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaXhR-0004Na-Nt for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 18:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 23:58: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.145679024516782 (code B ref 22786); Mon, 29 Feb 2016 23:58:01 +0000 Original-Received: (at 22786) by debbugs.gnu.org; 29 Feb 2016 23:57:25 +0000 Original-Received: from localhost ([127.0.0.1]:54323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaXgq-0004Mc-Qu for submit@debbugs.gnu.org; Mon, 29 Feb 2016 18:57:25 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:55776) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaXgo-0004MT-U0 for 22786@debbugs.gnu.org; Mon, 29 Feb 2016 18:57:23 -0500 Original-Received: from 109.179.251.45.tmi.telenormobil.no ([109.179.251.45] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aaXgH-0006JM-As; Tue, 01 Mar 2016 00:56:50 +0100 In-Reply-To: <83ziuj8r4d.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 29 Feb 2016 17:37:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aaXgH-0006JM-As MailScanner-NULL-Check: 1457395012.58966@zU28INabw3W/QpqilOaGQA 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:114182 Archived-At: Eli Zaretskii writes: > Removing the hardcoded value is probably a good idea (but maybe use it > as fallback if the HTML tag doesn't specify anything?). That's what it currently does. I think I'm going to just have it default to nil, and we'll see whether this makes things render badly in practice. My uninformed guess is that pages that mix scripts (like Wikipedia) will explicitly say that the paragraph direction is left-to-right, while pages with (mostly) only left-to-right (most pages) and right-to-left (Al Jazeera) are the ones that leave out the spec, so things should work out fine. But we'll see. > However, note that support for this in shr is currently incomplete. > First, there's a 3rd value, "auto", which is unsupported -- it should > set bidi-paragraph-direction to nil. I've now added this to shr. > So I think for best results we should add support for the remaining > bidi directives. Adding support for "dir=auto" in the HTML tag is > almost trivial. To support the rest of the directives you need to add > bidirectional formatting control characters before and/or around the > text that is marked with these directives. (If needed, I can provide > the details about the controls you need to insert in each case.) I think I remember the control characters from past discussions. But is the dir attribute used much in practice? I've tried to be very, very restrictive in what features I add to the common paths in shr. It's already slow enough, and each new line of code in the common paths add some slow down. It's death by a thousand cuts. :-) I don't oppose adding support for this if it's really used a lot in the wild, but if not, I'd rather not. (The "dir" attribute can apply to (almost) any HTML element, so the code to detect and react to it would go into `shr-descend', which is called once for every single HTML node in the document.) However, adding support for the and elements should be trivial, and will cause no slowdown, so I'll add them now... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no