martinbaillie / evil-motion-trainer

Make Emacs drop lazily repeated "hjkl"-based motions after a configurable threshold
https://martin.baillie.id/wrote/evil-motion-training-for-emacs/
49 stars 0 forks source link

Not dropping repeated commands #6

Closed PatrickWulfe closed 3 years ago

PatrickWulfe commented 3 years ago

According to the description, emacs should be dropping repeated hjkl commands, but I am just getting the pop up at the threshold and can keep entering the commands. In order for it to actually force me to stop, super annoying mode must be enabled. I'm not sure if this was the intended functionality based on the wording in the description. Definitely still usable, I was just expecting behavior closer to vim's hardtime where it actually drops repeated commands.

martinbaillie commented 3 years ago

Hm no they should get dropped. See the animated gif. Those pauses in the gif are because the command is not going further.

Something must be preventing that for you.

On Mon, Jul 5, 2021 at 11:07 am, Patrick Wulfe @.***> wrote:

According to the description, emacs should be dropping repeated hjkl commands, but I am just getting the pop up at the threshold and can keep entering the commands. In order for it to actually force me to stop, super annoying mode must be enabled. I'm not sure if this was the intended functionality based on the wording in the description. Definitely still usable, I was just expecting behavior closer to vim's hardtime where it actually drops repeated commands.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

PatrickWulfe commented 3 years ago

Here's what I tried (did this process four times, first for emacs 28, then 27 on both my desktop, then my laptop):

  1. Completely uninstall, then reinstall emacs
  2. Install a fresh copy of doom emacs with the default config
  3. Add the recipe for evil-motion-trainer from your dotfiles into package.el
  4. doom sync
  5. open a file in emacs
  6. M-x evil-motion-trainer-mode And I still had the same behavior where it will give me the notification at the bottom of emacs, but I can continue to press hjkl without any key presses being dropped. I'm still pretty new to emacs, so if there's any other info I can give you to help out, or if there's some way I can debug the package to see why it's not dropping commands, I'd be happy to help as much as I can.
martinbaillie commented 3 years ago

Ah I just updated and I see what you mean @PatrickWulfe. It was introduced with the most recent PR:

FYI @tecosaur

For now the previous commit should work fine and I'll try to find time to look at it properly soon.

martinbaillie commented 3 years ago

This should be fixed on latest with https://github.com/martinbaillie/evil-motion-trainer/commit/32472acace6be6d99af1ab16cecaaea4344471ec