Implement lazy elfeed scrolling

This commit is contained in:
Case Duckworth 2021-09-02 17:07:36 -05:00
parent c5bba76bf8
commit 82e20c402f
1 changed files with 20 additions and 1 deletions

21
init.el
View File

@ -1359,7 +1359,26 @@ like a dumbass."
(acdw/reading-mode)))
;; see https://irreal.org/blog/?p=8885
)
;; Lazy Elfeed (karthinks)
(defun elfeed-scroll-up-command (&optional arg)
"Scroll up or go to next feed item in Elfeed"
(interactive "^P")
(let ((scroll-error-top-bottom nil))
(condition-case-unless-debug nil
(scroll-up-command arg)
(error (elfeed-show-next)))))
(defun elfeed-scroll-down-command (&optional arg)
"Scroll up or go to next feed item in Elfeed"
(interactive "^P")
(let ((scroll-error-top-bottom nil))
(condition-case-unless-debug nil
(scroll-down-command arg)
(error (elfeed-show-prev)))))
;; Turns out, `scroll-up' and `scroll-down' are /backward/
(define-key elfeed-show-mode-map (kbd "SPC") 'elfeed-scroll-up-command)
(define-key elfeed-show-mode-map (kbd "S-SPC") 'elfeed-scroll-down-command))
(setup (:straight elisp-slime-nav)
(:hook-into emacs-lisp-mode