ace-jump-mode icon indicating copy to clipboard operation
ace-jump-mode copied to clipboard

Non-latin characters support

Open maximvl opened this issue 11 years ago • 12 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.

maximvl avatar Aug 22 '13 08:08 maximvl

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.

winterTTr avatar Aug 22 '13 11:08 winterTTr

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)

maximvl avatar Aug 23 '13 13:08 maximvl

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.)

dmj avatar Aug 24 '13 09:08 dmj

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.

impaktor avatar Mar 04 '14 18:03 impaktor

On a related note, the (read-char) calls should inherit the input method, so the user can actually input any character.

ghost avatar Aug 11 '14 19:08 ghost

It would be great to support non-latin characters. This is not a bug but it can be a worthy feature :+1:

y-usuzumi avatar Dec 11 '14 03:12 y-usuzumi

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).

geraldus avatar Mar 12 '15 05:03 geraldus

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.

doctorate avatar May 02 '15 08:05 doctorate

@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 avatar Nov 09 '17 20:11 m1cm1c

Less than 10 minutes into using it, I found a bug and already removed @dmj's code from my init file.

When using dired, I commonly jump to .. which without @dmj's code counts as a word. With it, it doesn't. But somehow a ton of other characters do.

m1cm1c avatar Nov 09 '17 20:11 m1cm1c

@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.

impaktor avatar Nov 09 '17 21:11 impaktor

@impaktor Thank you. Should've looked at the date of the last commit, I guess. ^^

avy-goto-word-1 does what I want. :)

m1cm1c avatar Nov 09 '17 21:11 m1cm1c