From 768b0620479b2695388345293f773bc28b79d8ae Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 11 May 2022 17:52:54 -0700 Subject: elfeed: disable proportional fonts and use eww to render article --- emacs/custom/my-elfeed.el | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'emacs/custom') diff --git a/emacs/custom/my-elfeed.el b/emacs/custom/my-elfeed.el index 9d4125e..d1ace62 100644 --- a/emacs/custom/my-elfeed.el +++ b/emacs/custom/my-elfeed.el @@ -18,13 +18,29 @@ (defalias 'elfeed-toggle-star (elfeed-expose #'elfeed-search-toggle-all 'star)) +;; set colors for some specific tags (defface elfeed-face-tag-mustread '((t :foreground "#f00")) "This is a custom font face for the `mustread' tag in Elfeed." :group 'elfeed) -(push '(mustread elfeed-face-tag-mustread) - elfeed-search-face-alist) +(with-eval-after-load 'elfeed + (setq elfeed-search-face-alist + '((mustread elfeed-face-tag-mustread)))) + +(defun my/elfeed-show-visit-eww () + "Visit the current entry in eww." + (interactive) + (let ((link (elfeed-entry-link elfeed-show-entry))) + (when link + (eww link)))) + +;; disable proportional fonts when displaying HTML content. +(advice-add #'elfeed-insert-html + :around + (lambda (fun &rest r) + (let ((shr-use-fonts nil)) + (apply fun r)))) ;; (defun copy-elfeed-link-title-to-org (entry) ;; "Copy the ENTRY title and URL as org link to the clipboard." -- cgit 1.4.1