Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keybindings don't work with Doom Emacs/Evil mode #11

Open
j-steinbach opened this issue Mar 2, 2021 · 3 comments
Open

Keybindings don't work with Doom Emacs/Evil mode #11

j-steinbach opened this issue Mar 2, 2021 · 3 comments

Comments

@j-steinbach
Copy link

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?

@j-steinbach
Copy link
Author

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.

@Flinner
Copy link

Flinner commented Aug 9, 2021

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

@beningodfrey4
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants