diff options
author | Case Duckworth | 2021-09-02 17:07:36 -0500 |
---|---|---|
committer | Case Duckworth | 2021-09-02 17:07:36 -0500 |
commit | 82e20c402f35bc174423eeae0e6abf76e44334ab (patch) | |
tree | 91af08f7425c3d5b5c87d4e721f68d5e4df73d3d | |
parent | Refactor Circe config (diff) | |
download | emacs-82e20c402f35bc174423eeae0e6abf76e44334ab.tar.gz emacs-82e20c402f35bc174423eeae0e6abf76e44334ab.zip |
Implement lazy elfeed scrolling
-rw-r--r-- | init.el | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/init.el b/init.el index 4478b97..441ca35 100644 --- a/init.el +++ b/init.el | |||
@@ -1359,7 +1359,26 @@ like a dumbass." | |||
1359 | (acdw/reading-mode))) | 1359 | (acdw/reading-mode))) |
1360 | 1360 | ||
1361 | ;; see https://irreal.org/blog/?p=8885 | 1361 | ;; see https://irreal.org/blog/?p=8885 |
1362 | ) | 1362 | ;; Lazy Elfeed (karthinks) |
1363 | (defun elfeed-scroll-up-command (&optional arg) | ||
1364 | "Scroll up or go to next feed item in Elfeed" | ||
1365 | (interactive "^P") | ||
1366 | (let ((scroll-error-top-bottom nil)) | ||
1367 | (condition-case-unless-debug nil | ||
1368 | (scroll-up-command arg) | ||
1369 | (error (elfeed-show-next))))) | ||
1370 | |||
1371 | (defun elfeed-scroll-down-command (&optional arg) | ||
1372 | "Scroll up or go to next feed item in Elfeed" | ||
1373 | (interactive "^P") | ||
1374 | (let ((scroll-error-top-bottom nil)) | ||
1375 | (condition-case-unless-debug nil | ||
1376 | (scroll-down-command arg) | ||
1377 | (error (elfeed-show-prev))))) | ||
1378 | |||
1379 | ;; Turns out, `scroll-up' and `scroll-down' are /backward/ | ||
1380 | (define-key elfeed-show-mode-map (kbd "SPC") 'elfeed-scroll-up-command) | ||
1381 | (define-key elfeed-show-mode-map (kbd "S-SPC") 'elfeed-scroll-down-command)) | ||
1363 | 1382 | ||
1364 | (setup (:straight elisp-slime-nav) | 1383 | (setup (:straight elisp-slime-nav) |
1365 | (:hook-into emacs-lisp-mode | 1384 | (:hook-into emacs-lisp-mode |