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

reverse-im translates a search string used in avy-goto-char-timer #40

Open
aragaer opened this issue Oct 5, 2024 · 2 comments
Open

Comments

@aragaer
Copy link

aragaer commented Oct 5, 2024

When trying to jump to a non-latin string using avy-goto-char-timer I am typing cyrillic characters but those are translated by reverse-im. Functions like avy-goto-char-timer use two separate calls to read-char, one is used to read the search string in avy--read-candidates function and that one should not be affected by reverse-im. The other call in avy--process-1 should be translated.

@aragaer
Copy link
Author

aragaer commented Oct 5, 2024

The following works

(advice-add #'avy--read-candidates :around
            (defun +suppress-reverse-im (fn &rest r)
              (advice-remove 'read-char reverse-im-read-char-advice-function)
              (unwind-protect
                  (funcall fn r)
                (advice-add #'read-char:around reverse-im-read-char-advice-function))))

I hope there is a more sane way to temporarily disable reverse-im.

@aragaer
Copy link
Author

aragaer commented Oct 6, 2024

it seems that avy-goto-char-timer itself works correctly, but any custom function that uses it doesn't. For example

(defun my-goto-char-timer ()
  (interactive)
  (avy-goto-char-timer))

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

1 participant