From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#16200: shr should allow user to toggle HTML-specified colors on and off Date: Fri, 20 Dec 2013 13:20:47 +0000 Message-ID: <87zjnvwte8.fsf@violet.siamics.net> 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 1387545734 6860 80.91.229.3 (20 Dec 2013 13:22:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Dec 2013 13:22:14 +0000 (UTC) To: 16200@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 20 14:22:21 2013 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 1Vu020-00006L-QY for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 14:22:21 +0100 Original-Received: from localhost ([::1]:49506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu020-0007OW-DX for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 08:22:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu01s-0007OD-6j for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 08:22:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vu01j-0005X6-2v for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 08:22:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu01i-0005X2-QU for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 08:22:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vu01i-00017M-Id for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 08:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16200 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13875456684204 (code B ref -1); Fri, 20 Dec 2013 13:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Dec 2013 13:21:08 +0000 Original-Received: from localhost ([127.0.0.1]:59754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu00q-00015h-2A for submit@debbugs.gnu.org; Fri, 20 Dec 2013 08:21:08 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:56387) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu00m-000150-PC for submit@debbugs.gnu.org; Fri, 20 Dec 2013 08:21:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=mV7ZbtOrZkQkdmf2SyARUSRRoA0Nw0jcdsMZ5MfaAq0=; b=I/K+kxK3aRvkJ5AIlQeUinLke56DQDKmp7D+KDdFNNcby6y0DYyiaXyyfKtfTjf3wXiSIeyfe4tjLIU+T/xkNq84QcAxCT/hwyXh8NCDg8fL2XRl9x/ACNcs4CPMIjRYMV+cnQ6HP+WjNbiHvwwasvezbn2ZW9Q2w9+ngBmgkIs=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Vu00g-0007ua-0H for submit@debbugs.gnu.org; Fri, 20 Dec 2013 13:20:58 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Vu00X-0004XV-I1 for submit@debbugs.gnu.org; Fri, 20 Dec 2013 20:20:50 +0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:82284 Archived-At: Package: emacs Severity: wishlist Badly-formatted netnews articles aren=E2=80=99t unknown in Usenet, so Gnus already comes with a set of commands [1] to improve the formatting of the messages as they=E2=80=99re shown to the user. I=E2=80=99d argue, however, that ugly HTML documents are much more common on the Web than such articles are on Usenet. Granted, shr.el does not (as of yet) support a good deal of features casually used to degrade the reader=E2=80=99s experience. Still, it supports the =E2=80=98fgcolor=E2=80=99, =E2=80=98text=E2=80=99 and =E2=80= =98bgcolor=E2=80=99 attributes to , and the =E2=80=98color=E2=80=99 attribute to ,= leaving the user no easy way to get rid of whatever color scheme the Web page author has decided to use. Also to note is that both the element and the =E2=80=98bgcol= or=E2=80=99 and =E2=80=98text=E2=80=99 attributes to were already deprec= ated as of HTML=C2=A04.01 (developed back in 1997=E2=80=931999 =E2=80=93 some 15 year= s ago! and the specification doesn=E2=80=99t seem to mention =E2=80=98fgcolor=E2=80= =99 at all) [2], and are entirely removed as of the latest HTML5 CR [3]. My guess is that there should be a (customizable) variable specifying whether these attributes should be honored by default, and a command (or a minor mode?) to change the setting for just the current buffer. As a crude (but working) workaround, those suffering of the =E2=80=9Ctoo=C2=A0much color=E2=80=9D problem may choose to redefine the s= hr-tag-body and shr-tag-font element handlers to simplistic wrappers around shr-generic in their ~/.emacs, like: (eval-after-load 'shr '(progn (defun shr-tag-body (cont) (let ((shr-stylesheet (list))) (shr-generic cont))) (defun shr-tag-font (cont) (shr-generic cont)))) [1] http://www.gnu.org/software/emacs/manual/html_node/gnus/Article-Washing= .html [2] http://www.w3.org/TR/html4/ [3] http://www.w3.org/TR/html5/ --=20 FSF associate member #7257