app/rss: improve entry readability

By not using variable-pitch fonts in the SHR-converted output and
allowing images to be larger than 60% of the window's width.

Also corrects the docstring for +rss|elfeed-wrap, promising to use
`visual-fill-column-mode` when it doesn't (and never did).

Also changes `=rss` to an alias.
This commit is contained in:
Henrik Lissner 2019-04-02 12:52:00 -04:00
parent 3310f9dfe2
commit ca32f7b7d1
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395
2 changed files with 5 additions and 6 deletions

View File

@ -1,10 +1,8 @@
;;; app/rss/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun =rss ()
"Activate (or switch to) `elfeed' in its workspace."
(interactive)
(call-interactively #'elfeed))
(defalias '=rss #'elfeed
"Activate (or switch to) `elfeed' in its workspace.")
;;;###autoload
(defun +rss/delete-pane ()
@ -50,10 +48,11 @@
;;;###autoload
(defun +rss|elfeed-wrap ()
"Enhances an elfeed entry's readability by wrapping it to a width of
`fill-column' and centering it with `visual-fill-column-mode'."
`fill-column'."
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
(setq-local truncate-lines nil)
(setq-local shr-use-fonts nil)
(setq-local shr-width 85)
(set-buffer-modified-p nil)))

View File

@ -27,7 +27,7 @@ easier to scroll through.")
elfeed-enclosure-default-dir (concat doom-local-dir "elfeed/enclosures/")
elfeed-show-entry-switch #'pop-to-buffer
elfeed-show-entry-delete #'+rss/delete-pane
shr-max-image-proportion 0.6)
shr-max-image-proportion 0.8)
(set-popup-rule! "^\\*elfeed-entry"
:size 0.75 :actions '(display-buffer-below-selected)