From: Ivan Shmakov <ivan@siamics.net>
To: 16200@debbugs.gnu.org
Subject: bug#16200: shr should allow user to toggle HTML-specified colors on and off
Date: Thu, 03 Apr 2014 08:37:09 +0000 [thread overview]
Message-ID: <87ioqq7qru.fsf@violet.siamics.net> (raw)
In-Reply-To: <87zjnvwte8.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 20 Dec 2013 13:20:47 +0000")
>>>>> Ivan Shmakov <ivan@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
next prev parent reply other threads:[~2014-04-03 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 13:20 bug#16200: shr should allow user to toggle HTML-specified colors on and off Ivan Shmakov
2014-02-02 2:46 ` Nathan Trapuzzano
2014-04-03 8:37 ` Ivan Shmakov [this message]
2014-11-14 3:30 ` Lars Magne Ingebrigtsen
2015-12-25 17:51 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ioqq7qru.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=16200@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).