manzyuk/google-translate — pull request #10 by atykhonov (2014-01-20 13:49:32+00:00)
Title: Word auto complete

The main motivation of this quite simple piece of code is that very often when I want to translate some string (word or phrase) which I'm currently reading in the buffer, I need to copy paste OR move the cursor to a word or a phrase, mark it, or just stay on a word, and then I can translate (then also very often I need to put point back to the original place). This piece of code is attempt to significantly reduce movements while translating a word. This code provides word auto completion. Words retrieves from *visible* part of current buffer so that there should not be any issues with performance in case of very huge buffers. In the same time, it would be, as for me, much more usable while reading docs, texts or just sitting in the erc, to be able to hit key binding (for ```google-translate-query-translate```) and then just by means of auto completion to complete the word which I'm currently watching at and don't understand what does it mean (translate it). And all this without any mouse or point movements.

I need to notice that I found one unpleasant side effect in that implementation. While auto completing... there could be a word, for example, "best". And after pressing space bar (assuming that I would like to translate "best book") minibuffer exists... So with such auto completion there could be no possibility for translating a phrase (because of space). Well the space could be inserted by ```quoted-insert``` but it could be not obvious and may cause the issues for some users while translating...

Please let me know what do you think about such feature. May be you could advise how to avoid the mentioned issue? In the meantime I'm looking for a solution...

Thank you!