From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Does shr support HTML directional attributes? Date: Tue, 05 May 2015 02:59:43 +0200 Message-ID: References: <83sibcs2ki.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430787639 12803 80.91.229.3 (5 May 2015 01:00:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2015 01:00:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 05 03:00:29 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YpRDp-0003Yb-15 for ged-emacs-devel@m.gmane.org; Tue, 05 May 2015 03:00:29 +0200 Original-Received: from localhost ([::1]:36483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpRDo-0004K8-1U for ged-emacs-devel@m.gmane.org; Mon, 04 May 2015 21:00:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpRDZ-0004K0-RD for emacs-devel@gnu.org; Mon, 04 May 2015 21:00:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpRDV-0000M8-Re for emacs-devel@gnu.org; Mon, 04 May 2015 21:00:13 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:43650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpRDV-0000Ab-JS; Mon, 04 May 2015 21:00:09 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1YpRD5-0002ae-VL; Tue, 05 May 2015 02:59:43 +0200 X-Hashcash: 1:23:150505:eliz@gnu.org::ouhTGep45iryQCnC:00000d6Pl X-Hashcash: 1:23:150505:emacs-devel@gnu.org::7ylzPkcjsSDaQ9ny:000000000000000000000000000000000000000002CT9s In-Reply-To: <83sibcs2ki.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 04 May 2015 19:57:33 +0300") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1YpRD5-0002ae-VL MailScanner-NULL-Check: 1431392384.6233@pHOVzGg125l6L2HphOLjQQ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186220 Archived-At: Eli Zaretskii writes: > I've just got a (spam) mail in Arabic whose portions were displayed > left-aligned, which is not what the HTML payload wanted (it used > dir=RTL and style='margin-right:.5in;text-align:right...'), which > AFAIU should have caused the text rendered as right-to-left paragraph. > > Does shr support these attributes? Nope; shr doesn't support the "dir" attribute in elements. I think there used to be support for the text-align style attribute in cells, but looking at shr.el now, that seems to have been lost during the variable-width font rewrite. shr is a pretty minimal HTML renderer -- it tries to be fast enough for most web pages, but it doesn't try very hard to be an accurate HTML renderer. There's tons of stuff it doesn't support, because it'd be too slow. If you find a way to support those two elements without affecting the general rendering speed, please go ahead and add support for them. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no