Weird delay when using `backspace` in `mu4e-compose-mode`
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### What did you expect to happen?
Deleting any character using `Backspace` is a lightning fast operation.
### What actually happened?
In `mu4e:compose` mode, when typesetting inline replies to an email (text, not html), deletion of the last character of the line with `Backspace` is extremely slow.
### Describe your attempts to resolve the issue
I profiled the code, and find that 99 percent of the time is spent in the `command-execute` function. However, finding the call hierarchy is beyond my abilities.
I am not sure if this is a Doom related issue (I actually think it is not), but I didn't know where to start my journey of fixing this bug, so here I am.
### Steps to reproduce
1. Open an email with Emacs `mu4e`.
2. Reply to this email.
3. Move the cursor down to the quoted email.
4. Start writing an inline reply, make sure that the cursor is at the end of the line.
5. Still in insert mode, use `Backspace` to delete the last character.
6. The operation `(evil-delete-backward-char-and-join COUNT)`, which is issued by `Backspace` in insert mode, takes about a second to complete.
### System Information
https://pastebin.com/bpxTuqSc
EDIT: Funnily enough, `Backspace` works just fine in all other locations of the file.
EDIT2: I just realized, that `Backspace` is also terribly slow when only space comes after the last character. So it is not the end of line that matters, but the end of non-whitespace characters.
EDIT3: As expected, the behavior is normal, when changing to other modes, such as `fundamental-mode`. So it seems to be an issue of `mu4e-compose-mode`, and it is independent of `org-msg-mode` (I checked that).
EDIT4: It is not whitespace characters, but also "end of sentence like" characters such as `.:;,` that can be after the curser, and Backspace is still slow.
Contributor guide
Assessment
This issue has not been assessed yet.