aboutsummaryrefslogtreecommitdiffstats
path: root/oni-elfeed.el
diff options
context:
space:
mode:
Diffstat (limited to 'oni-elfeed.el')
-rw-r--r--oni-elfeed.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/oni-elfeed.el b/oni-elfeed.el
index 83a734f..bedb0c9 100644
--- a/oni-elfeed.el
+++ b/oni-elfeed.el
@@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2021.0611.011733
-;; Package-Requires: (elfeed)
+;; Version: 2021.0701.175714
+;; Package-Requires: (elfeed olivetti)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -27,6 +27,12 @@
;;; Code:
(require 'elfeed)
+(require 'shr)
+
+(defun oni-elfeed-enable-olivetti-mode ()
+ "Change ‘olivetti-body-width’ to match the ‘shr-max-width’."
+ (setq-local olivetti-body-width (1+ shr-max-width))
+ (olivetti-mode))
(setq elfeed-feeds
'("http://nullprogram.com/feed/"
@@ -70,5 +76,7 @@
(elfeed-make-tagger :before "2 weeks ago"
:remove 'unread))
+(add-hook 'elfeed-show-mode-hook #'oni-elfeed-enable-olivetti-mode)
+
(provide 'oni-elfeed)
;;; oni-elfeed.el ends here