Non-latin characters support
maximvl opened this issue · comments
Hi, when I try to ace-jump on non-latin character I get a message:
ace-jump-word-mode: [AceJump] Non-printable character
While I'm using emacs mostly for programming, I'm used to ace-jump and sometimes missing ace-jump in jabber/irc/etc.
Yes, I have to say that this should be by design at this moment.
Right now, we check what user input only in the scope of printable ascii string.
I think your input is indeed printable, but not a ascii string.
I must say that the warning message is not proper, but the behavior is expected from the current implementation.
I think its better to use char-displayable-p
than determine ranges by hand. And there is no big sense in ability to jump to characters which emacs cant display.
UPD: there is also a table of printable chars: (aref printable-chars char)
I use this defadvice in my .emacs: https://gist.github.com/dmj/3944275 -- I need this functionality in order to quick-jump to text pieces containing german umlauts ("ä", "ö" etc.)
I was just about to file an issue report on this, but saw this post. The code
by @dmj works, but now I wonder if there are any downsides with that code,
since this feature is not part of ace-jump-mode (yet)?
Otherwise, I suggest mentioning it (early) in the FAQ.
On a related note, the (read-char) calls should inherit the input method, so the user can actually input any character.
It would be great to support non-latin characters. This is not a bug but it can be a worthy feature 👍
I'm switching between two keyboard layouts internally in Emacs: C-</kbd> toggle input method
, and when I enter char in Ace-Jump mode, AJ catches latin variant of pressed key, e.g. when I press cyrillic м
, AJ uses v
instead, latin V and cyrillic М both are the same keyboard key. Note, while internally Emacs uses Russian input method, my system keyboard layout is English (and it must be English to make things behave correctly in Emacs).
me too, I need to have ace-jump to work when I write using Hebrew/Arabic/Greek/German umlauts text, arabic/hebrew/greek-input-font
. Right now only ascii code in those scripts is working. I would like to see a solution to extend AJ to cover non-latin character sets as well.
@dmj Thank you! Is there any unexpected behavior when using your hack? If there are none: Why isn't this change adopted by the maintainer? Using ace-jump-mode when editing German texts is much less comfortable than when editing English texts because you always have to check whether the word you want to jump to starts with an Umlaut and then choose a different word.
@m1cm1c use avy instead, it does the same thing, and more, and is maintained, and works flawlessly with umlauts and non-ascii.
https://github.com/abo-abo/avy
avy is the spiritual successor of ace-jump-mode, which is stone cold dead.