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

advise read-key as well as read-key-sequence #865

Merged
merged 2 commits into from
Mar 4, 2023

Conversation

willghatch
Copy link
Contributor

As discussed in #857 and #858, the use of read-key in the evil-surround package broke evil-repeat, or .. This is because read-key changes the result of this-command-keys just like read-key-sequence. read-key-sequence is advised to fix this issue. This patch merely gives the same advice to read-key, fixing the issues that have been caused by its use.

@ninrod
Copy link
Member

ninrod commented Jun 26, 2017

hum. 1 test case failed. can't find it.

@wasamasa
Copy link
Member

In graphical Emacs, this fails two repeat-related tests, evil-test-repeat-digraph and evil-test-repeat-kill-buffer.

@willghatch
Copy link
Contributor Author

Ah, when I ran the tests I think I didn't see the failure because it was picking up .elc files. I've now fixed the tests and I get no errors in terminal or graphical mode. But having fixed the test, I'm now not sure that the advice for read-key-sequence (and with this patch also read-key) is actually correct. As is, it calls any function that is the result of (evil-repeat-type this-command t), and when that is evil-repeat-keys that makes a lot of sense. But when it is evil-repeat-changes (which is what evil-insert-digraph uses), it makes a lot less sense to me. I think maybe the advice should only call it when it is evil-repeat-keys.

@willghatch
Copy link
Contributor Author

Huh, I get no errors on my machine, but travis is getting one and I can't tell what it is that failed. If I understand the travis page right, it's passing for emacs 24.3 but failing for all the others it's trying. I'm on emacs 26 built from emacs git master of a couple months ago... Maybe tomorrow I'll get a version of emacs it's failing on and test it there.

@wasamasa
Copy link
Member

This is unfortunate indeed. IIRC @TheBB is working on a version of the tests where as much as possible runs in batch mode.

@TheBB
Copy link
Member

TheBB commented Jun 27, 2017

Yeah I am, they're so damn fickle though.

@TheBB
Copy link
Member

TheBB commented Nov 22, 2019

If anyone is still interested in this, I rebased it on master (with a more sensible travis setup) and there's only one failure for 24.5.

@willghatch
Copy link
Contributor Author

willghatch commented Nov 22, 2019 via email

@wbolster
Copy link
Contributor

also still interested since evil-swap-keys.el and evil's repeat facility seem to interfere and it seems like this is related

willghatch and others added 2 commits March 3, 2023 11:13
With the Evil repeat system now aware of read-key, there is no need for
the digraph repeat workaround introduced by commit
dba2fa9.
@axelf4 axelf4 force-pushed the fix-evil-repeat-advice branch from 8e5fb21 to d332a3b Compare March 4, 2023 09:46
@axelf4 axelf4 merged commit 2b2ba3c into emacs-evil:master Mar 4, 2023
@willghatch willghatch deleted the fix-evil-repeat-advice branch August 10, 2023 02:49
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

Successfully merging this pull request may close these issues.

6 participants