[oni-elfeed] Enable ‘olivetti-mode’
This commit is contained in:
parent
7ac2b35a33
commit
763395814f
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue