domingo, 22 de enero de 2017

Autocomplete erc nicks with @ sign (for slack)

 This is a very quick hack for something I've wanted for some time.  I'm using slack through their IRC gateway. That allows me to use erc, yasnippets, bug-reference-mode,  and whatnot.

The few things that annoy me of that interface is that to ping users, in slack you are expected to prepend the nick with an at sign. That makes autocompletion kinda useless because, as this redditor explains , it's a pain in the ass to type the nick, autocomplete, go back, add the @ sign, and move forward.

I haven't found a way to solve this in an elegant way, but as a hack, I could add tihs advice functions that will understand @nick as well as 'nick' when autocompleting.  I'd love to be able to just type the name and the autocompletion framework fill the '@'  sign itself, but I couldn't find it, so I'll try this approach I got so far and see if it works well enough for me.

I hope it's useful for some of you, dear emacslackers :)