doomemacs / doomemacs/core

`wdired-mode` loses evil keybindings when entered from `dired-mode` a second time

Open
#8,800 4 comments 0 reactions 0 assignees View on GitHub
:emacs dired re:evil
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### Describe your issue

Something weird is going on with the `wdired-mode` keymaps. If you enter `wdired-mode` with either `i` (`dired-toggle-read-only`) or `wdired-change-to-wdired-mode`, everything appears normal, but then if you exit it with `ESC` and return to `wdired-mode` again, most of your evil keybinds no longer work, and the message buffer suggests you use Emacs shortcuts to save/abort. If you toggle `evil-emacs-state` with `Ctrl-z`, you can force the evil keybindings to be reloaded.

This happens with both `dired` and `(dired +dirvish)` in `init.el`.

Someone on Discord also encountered this:
https://discord.com/channels/406534637242810369/1454819425160269958/1454819425160269958

### Steps to reproduce

1. Open Emacs
2. Press `SPC o -`
3. Enter `wdired-mode` by pressing `i`
4. Exit `wdired-mode` back to `dired-mode` with ``
5. Enter `wdired-mode` by pressing `i` again
6. Try using evil keybindings like `i` or `x`

### System information

https://pastebin.com/7QZpasFK

### Disclosures

- [ ] This issue was written with/by AI.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.