diff options
author | jao <jao@gnu.org> | 2022-07-28 03:43:01 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-07-28 03:43:01 +0100 |
commit | 56c03089a5af5359d78c78d1910db11bd41f9a8a (patch) | |
tree | a514da634da0d0121512ca86ae8584b2257ada21 | |
parent | bcf4198d468f5ae62cb29041fcccfba5c9aed709 (diff) | |
download | elibs-56c03089a5af5359d78c78d1910db11bd41f9a8a.tar.gz elibs-56c03089a5af5359d78c78d1910db11bd41f9a8a.tar.bz2 |
gnus: browse html with external browser when needed
-rw-r--r-- | custom/jao-custom-gnus.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 1ba2192..8f76563 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -641,15 +641,24 @@ (add-hook 'gnus-select-article-hook #'jao-gnus--init-images) +(defun jao-gnus-browse-html () + (interactive) + (let ((browse-url-browser-function jao-browse-url-external-function) + (browse-url-handlers nil) + (browse-url-default-handlers nil)) + (gnus-article-browse-html-article))) + (defun jao-gnus-show-images () (interactive) - (save-window-excursion - (gnus-summary-select-article-buffer) - (save-excursion - (setq jao-gnus--images (not jao-gnus--images)) - (if jao-gnus--images - (gnus-article-show-images) - (gnus-article-remove-images))))) + (if window-system + (save-window-excursion + (gnus-summary-select-article-buffer) + (save-excursion + (setq jao-gnus--images (not jao-gnus--images)) + (if jao-gnus--images + (gnus-article-show-images) + (gnus-article-remove-images)))) + (jao-gnus-browse-html))) ;;;; remove html in From: (require 'shr) |