GNU bug report logs - #67987
Replacing faces applied by shr

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Sat, 23 Dec 2023 07:18:01 UTC

Severity: wishlist

Full log


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

From: Po Lu <luangruo <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Replacing faces applied by shr
Date: Sat, 23 Dec 2023 15:16:13 +0800
It is currently impossible to display text inside <pre> or <code> tags
in a face besides `default' or `shr-code', which runs contrary to its
stated purpose of being a general mechanism for displaying HTML snippets
as text.  The variable that controls the faces selected for other tags
is also marked "private."  For this reason, I find myself modifying
face-remapping-alist rather than variables provided by shr, just to
change the fonts shr applies in my own callers.

Not even face-remapping-alist is a complete solution, since different
alists cannot be applied to separate portions of a buffer.  Thus users
are ultimately forced to iterate over the text properties shr inserts
and modifying each face property encountered, or to define an
`shr-external-rendering-function' for each tag it might render.

For a start, I'd like to see `shr-current-font' made public and
variables defined for each of the tags that override it controlling the
faces by which it is overridden.

Thanks.




This bug report was last modified 1 year and 241 days ago.

Previous Next


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