abo-abo / avy

Jump to things in Emacs tree-style
1.72k stars 110 forks source link

Avy misrecognizes remapped C-g #375

Closed nameiwillforget closed 3 weeks ago

nameiwillforget commented 3 weeks ago

Hello! I love avy, but it has one slightly buggy behavior. For context, I use StumpWM, which can translate keyboard-shortcuts before they arrive at programs, and because rebinding C-g in Emacs would be a problem I've configured Stump to translate C-. to C-g when it is sent to Emacs. Literally the only occasion I've found in which this isn't not working is when I'm using Avy and it is displaying the characters marking the points I could jump to. In this case, if I type C-. (which is translated to C-g) I get

No such candidate: , hit ‘C-g’ to quit.

(just in case this symbol doesn't appear right on the screen, because it doesn't on mine, it's ^G but together as one symbol). I can then hit C-g, which is actually rebound to do something different in my custom map, and it quits the selection process, probably because Avy uses something like a transient map. Avy rebinding C-g over my other maps isn't a problem, but it would be nice if you could configure it to also accept what it sees as /^G for quitting.

nameiwillforget commented 3 weeks ago

Oh, I just see I can customize the escape characters list. Sorry, I should have seen that first!