diff options
author | Tom Willemse | 2021-07-01 18:01:24 -0700 |
---|---|---|
committer | Tom Willemse | 2021-07-01 18:01:24 -0700 |
commit | 763395814f2bff864850ae56dc1926b9e2c5c360 (patch) | |
tree | 28431ec9e0a347060b4813c85e7ebf47e19dc632 | |
parent | 7ac2b35a33f4e4015c9e8f67411ddc520500ab00 (diff) | |
download | emacs-config-763395814f2bff864850ae56dc1926b9e2c5c360.tar.gz emacs-config-763395814f2bff864850ae56dc1926b9e2c5c360.zip |
[oni-elfeed] Enable ‘olivetti-mode’
-rw-r--r-- | oni-elfeed.el | 12 |
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 |