GNU bug report logs - #16200
shr should allow user to toggle HTML-specified colors on and off

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Fri, 20 Dec 2013 13:22:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16200 in the body.
You can then email your comments to 16200 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16200; Package emacs. (Fri, 20 Dec 2013 13:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 Dec 2013 13:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: shr should allow user to toggle HTML-specified colors on and off 
Date: Fri, 20 Dec 2013 13:20:47 +0000
Package:  emacs
Severity: wishlist

	Badly-formatted netnews articles aren’t unknown in Usenet, so
	Gnus already comes with a set of commands [1] to improve the
	formatting of the messages as they’re shown to the user.

	I’d 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’s experience.  Still, it
	supports the ‘fgcolor’, ‘text’ and ‘bgcolor’ attributes to
	<body />, and the ‘color’ attribute to <font />, 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 <font /> element and the ‘bgcolor’
	and ‘text’ attributes to <body /> were already deprecated as of
	HTML 4.01 (developed back in 1997–1999 – some 15 years ago! and
	the specification doesn’t seem to mention ‘fgcolor’ 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
	“too much color” problem may choose to redefine the shr-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/

-- 
FSF associate member #7257




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16200; Package emacs. (Sun, 02 Feb 2014 02:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 16200 <at> debbugs.gnu.org (full text, mbox):

From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 16200 <at> debbugs.gnu.org
Subject: Re: bug#16200: shr should allow user to toggle HTML-specified colors
 on and off
Date: Sat, 01 Feb 2014 21:46:28 -0500
Ivan Shmakov <ivan <at> siamics.net> writes:

> 	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.

I second this.  w3m knows that my Emacs frames have white text on a
black background and renders the pages accordingly, regardless of their
color settings.  An equivalent feature in shr would invite me to switch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16200; Package emacs. (Thu, 03 Apr 2014 08:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 16200 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 16200 <at> debbugs.gnu.org
Subject: Re: shr should allow user to toggle HTML-specified colors on and off 
Date: Thu, 03 Apr 2014 08:37:09 +0000
>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

 > Badly-formatted netnews articles aren’t unknown in Usenet, so Gnus
 > already comes with a set of commands [1] to improve the formatting of
 > the messages as they’re shown to the user.

 > I’d 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’s experience.

	(Such as, for instance, font-size:, especially when combined
	with a non-‘auto’ width:.)

 > Still, it supports the ‘fgcolor’, ‘text’ and ‘bgcolor’ attributes to
 > <body />, and the ‘color’ attribute to <font />, leaving the user no
 > easy way to get rid of whatever color scheme the Web page author has
 > decided to use.

	And, well, it also supports the color-related CSS properties, at
	least those specified via the ‘style’ HTML attribute.

[…]

 > As a crude (but working) workaround, those suffering of the “too much
 > color” problem may choose to redefine the shr-tag-body and
 > shr-tag-font element handlers to simplistic wrappers around
 > shr-generic in their ~/.emacs, like:

[…]

	I stand corrected: this workaround does not help with the CSS
	(‘style’ attribute) color settings.  Redefining
	shr-colorize-region to a no-op, however, seems to work:

(eval-after-load 'shr
  '(defun shr-colorize-region (start end fg &optional bg)
     nil))

	A proper solution would probably be to allow for a custom
	initial stylesheet, along with a proper cascading implementation
	(including the ‘!important’ flag handling), so that the user
	could both specify the default appearance, /and/ override the
	explicit styles as set by the HTML document being rendered.

 > [1] http://www.gnu.org/software/emacs/manual/html_node/gnus/Article-Washing.html

[…]

-- 
FSF associate member #7257




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16200; Package emacs. (Fri, 14 Nov 2014 03:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 16200 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 16200 <at> debbugs.gnu.org
Subject: Re: bug#16200: shr should allow user to toggle HTML-specified colors
 on and off
Date: Fri, 14 Nov 2014 04:30:05 +0100
See

http://permalink.gmane.org/gmane.emacs.devel/177000

and the preceding thread for some discussion on this

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16200; Package emacs. (Fri, 25 Dec 2015 17:52:02 GMT) Full text and rfc822 format available.

Message #17 received at 16200 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 16200 <at> debbugs.gnu.org
Subject: Re: bug#16200: shr should allow user to toggle HTML-specified colors
 on and off
Date: Fri, 25 Dec 2015 18:51:20 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> http://permalink.gmane.org/gmane.emacs.devel/177000
>
> and the preceding thread for some discussion on this

I've now implemented a toggle in eww for colors.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 25 Dec 2015 17:52:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.2, send any further explanations to 16200 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 25 Dec 2015 17:52:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Jan 2016 12:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:04 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 26.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:04 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 25.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Jan 2017 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 128 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.