1
0
Fork 0

[oni-elfeed] Enable ‘olivetti-mode’

This commit is contained in:
Tom Willemse 2021-07-01 18:01:24 -07:00
parent 7ac2b35a33
commit 763395814f

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2021.0611.011733 ;; Version: 2021.0701.175714
;; Package-Requires: (elfeed) ;; Package-Requires: (elfeed olivetti)
;; This program is free software; you can redistribute it and/or modify ;; 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 ;; it under the terms of the GNU General Public License as published by
@ -27,6 +27,12 @@
;;; Code: ;;; Code:
(require 'elfeed) (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 (setq elfeed-feeds
'("http://nullprogram.com/feed/" '("http://nullprogram.com/feed/"
@ -70,5 +76,7 @@
(elfeed-make-tagger :before "2 weeks ago" (elfeed-make-tagger :before "2 weeks ago"
:remove 'unread)) :remove 'unread))
(add-hook 'elfeed-show-mode-hook #'oni-elfeed-enable-olivetti-mode)
(provide 'oni-elfeed) (provide 'oni-elfeed)
;;; oni-elfeed.el ends here ;;; oni-elfeed.el ends here