diff options
author | 2014-12-27 21:44:45 +0100 | |
---|---|---|
committer | 2014-12-27 21:44:45 +0100 | |
commit | 29075fd652594f7a47ee333041f6605b9cb1f56d (patch) | |
tree | 40fdea17a01c0108c6f197d4ad31ae2e8e241229 /articles/shr-dont-colorize.org | |
parent | b3c89eda7c0b60930c5bd9b276b0e49d9573135c (diff) | |
download | orgweb-29075fd652594f7a47ee333041f6605b9cb1f56d.tar.gz orgweb-29075fd652594f7a47ee333041f6605b9cb1f56d.zip |
Add articles
Diffstat (limited to 'articles/shr-dont-colorize.org')
-rw-r--r-- | articles/shr-dont-colorize.org | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/articles/shr-dont-colorize.org b/articles/shr-dont-colorize.org new file mode 100644 index 0000000..103a79b --- /dev/null +++ b/articles/shr-dont-colorize.org @@ -0,0 +1,31 @@ +#+TITLE: +#+STARTUP: showall + +* Stop shr from using background color :emacs:elisp:config: + :PROPERTIES: + :PUBDATE: <2014-04-03 Thu 22:11> + :END: + + Here's just one more example why Emacs is so awesome + + Reading mail in Gnus is very nice, but shr has become a little too + good at its job. Add to this the many occasions when a background is + specified without specifying a foreground, plus a color theme that + is the inverse of what is usually expected, and you can get + hard-to-read HTML messages, gray foreground and gray background. + + I've looked at the other possible renderers, but they don't look + very nice compared to shr. So just remove its ability to add + background colors. + + #+BEGIN_SRC emacs-lisp + (defun oni:shr-colorize-remove-last-arg (args) + "If ARGS has more than 3 items, remove the last one." + (if (> (length args) 3) + (butlast args) + args)) + + (with-eval-after-load 'shr + (advice-add #'shr-colorize-region :filter-args + #'oni:shr-colorize-remove-last-arg)) + #+END_SRC |