;;; my-elfeed.el --- Configure elfeed -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (require 'elfeed) (require 'elfeed-org) (with-eval-after-load 'elfeed-search '(define-key elfeed-search-mode-map (kbd "*") 'elfeed-toggle-star)) (add-hook 'after-init-hook 'elfeed-org) (customize-set-variable 'elfeed-search-filter "@1-month-ago +unread") (customize-set-variable 'rmh-elfeed-org-files (list (expand-file-name "etc/elfeed.org" user-emacs-directory))) (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) (with-eval-after-load 'elfeed (setq elfeed-search-face-alist '((mustread elfeed-face-tag-mustread) (unread elfeed-search-unread-title-face)))) (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)))) (provide 'my-elfeed) ;;; my-elfeed.el ends here