I currently have the following settings for
hippie-expand in my
(setq hippie-expand-try-functions-list '(try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-complete-lisp-symbol-partially try-complete-lisp-symbol))
However, there is one thing annoying me: The order of suggestions I get when I use the completion function. I want it to suggest the shortest completion first, not the longest one. For example when I write a text and I know I used the word I am currently writing and other variations before in the text, I want it to suggest the "lowest common denominator" of those words and not the longest of the words. Then I can simply type the next letter "giving emacs another hint" and use completion again. This can go on until I got the complete word. I like this more than switching through a long list of words. For code it is similar. I don't want the first suggestion to be the longest expression, which it can find in the buffers, but the shortest one, because the longest one might confuse, because it might be several lines long (for example s-expressions in any Lisp).
How can I reverse the order of suggestions or make it show the shortest first?
- I now think it always suggests the least recently used completion. In text this seems OK, although I am used to having the shortest one first. However in Code, for example for some s-expressions, this is terrible, as it will insert whole blocks of code, when I only want it to complete some name of a procedure or a variable name.