elfeed-dashboard
elfeed-dashboard copied to clipboard
Keybindings don't work with Doom Emacs/Evil mode
I am using the "default" elfeed-dashboard.org
file.
It comes with some keybindings declared in the org-file.
#+STARTUP: showall showstars indent
#+KEYMAP: u | elfeed-dashboard-query "+unread"
#+KEYMAP: e | elfeed-dashboard-query "+unread +emacs"
#+KEYMAP: b | elfeed-dashboard-query "+unread +blogs"
#+KEYMAP: m | elfeed-dashboard-query "+unread +monitoring"
#+KEYMAP: v | elfeed-dashboard-query "+unread +video"
#+KEYMAP: n | elfeed-dashboard-query "+unread +news"
#+KEYMAP: s | elfeed
#+KEYMAP: g | elfeed-dashboard-update-links
#+KEYMAP: U | elfeed-dashboard-update
#+KEYMAP: E | elfeed-dashboard-edit
#+KEYMAP: q | kill-current-buffer
None of these work for me.
But when I enable the evil-emacs-state (C-z
), it magically works again.
I tried to re-bind the keys
(after! elfeed-dashboard
(evil-define-key 'normal elfeed-dashboard-mode-map
"q" 'kill-current-buffer
;; "s" 'elfeed
;; "U" 'elfeed-dashboard-update
;; "u" 'elfeed-dashboard-query "+unread"
...
but don't know how to add the query parameters.
A look into elfeed-dashboard.el
shows me that there is some black magic happening in the function elfeed-dashboard-parse-keymap
. Apparently it reads the keybindings defined locally in the .org file and then applies them? So my re-binding approach likely won't work.
How do I get the key-binds to work in Doom Emacs?
Small interim solution to define a query in the config.el
"u" (lambda () (interactive) (elfeed-dashboard-query "+unread"))
This works, but when I exit the *elfeedsearch* buffer (q
) I get the error rss workspace doesn't exist and it puts me in the emacs dashboard, whereas I expect to be returned to the elfeed dashboard.
another solution would be to set the initial state to emacs
(evil-set-initial-state 'elfeed-dashboard-mode 'emacs)
I use use-package
so I added it after :config
This works, but when I exit the elfeedsearch buffer (
q
) I get the error rss workspace doesn't exist and it puts me in the emacs dashboard, whereas I expect to be returned to the elfeed dashboard.
This happens as some doom-specific autoloads (+rss/delete-pane
) expect the rss workspace to exist, which is created when you invoke elfeed with =rss
(which calls (elfeed)
internally).
Also, any progress in getting the keybinds to work?