GNU bug report logs - #50383
28.0.50; [PATCH] Feature suggestion, gnus-article-toggle-fonts to toggle fonts for HTML articles

Previous Next

Package: emacs;

Reported by: Alex Bochannek <alex <at> bochannek.com>

Date: Sat, 4 Sep 2021 20:55:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 28.0.50; [PATCH] Feature suggestion, gnus-article-toggle-fonts
 to toggle fonts for HTML articles
Date: Sat, 04 Sep 2021 18:18:25 -0700
[Message part 1 (text/plain, inline)]
Alex Bochannek <alex <at> bochannek.com> writes:

> Hello!
>
> A while back I turned off `shr-use-fonts' for my HTML email but found
> that occasionally proportional fonts are useful when reading my
> messages.
>
> I am proposing the below `gnus-article-toggle-fonts' function with a
> keybinding of `W D F'.

The patch did not keep the fonts toggled when selecting the next message
or reloading the current one. I am proposing the below change. I am not
sure how you feel about buffer-local Gnus variables in `mm-decode.el',
so please let me know if an alternative approach would be better.

Thanks!
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 82d1de25f3..5c5896446e 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1843,6 +1843,9 @@ mm-shr
 				      (buffer-string))))))
 	(shr-inhibit-images mm-html-inhibit-images)
 	(shr-blocked-images mm-html-blocked-images)
+	(shr-use-fonts (if (local-variable-p 'gnus-article-shr-use-fonts)
+                           gnus-article-shr-use-fonts
+                         shr-use-fonts))
 	charset coding char document)
     (mm-with-part (or handle (setq handle (mm-dissect-buffer t)))
       (setq case-fold-search t)
[Message part 3 (text/plain, inline)]
-- 
Alex.

This bug report was last modified 3 years and 252 days ago.

Previous Next


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