From ca32f7b7d1016eb69728ff17a67ef62617d6008a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 2 Apr 2019 12:52:00 -0400 Subject: [PATCH] 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. --- modules/app/rss/autoload.el | 9 ++++----- modules/app/rss/config.el | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/app/rss/autoload.el b/modules/app/rss/autoload.el index 14e633b5f..bee317f78 100644 --- a/modules/app/rss/autoload.el +++ b/modules/app/rss/autoload.el @@ -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))) diff --git a/modules/app/rss/config.el b/modules/app/rss/config.el index 2aedd9816..59cadfc6c 100644 --- a/modules/app/rss/config.el +++ b/modules/app/rss/config.el @@ -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)