TeXStudio autocompletes environments. How can I get AUCTeX to do the same?
I can begin typing an environment name (say myenvironment) and, after entering a part of it (my, myenv, etc.), I hit Control-Alt-Space, and TeXStudio autocompletes the environment (asking if there are multiple possibilities), and sets the point between \begin{myenvironment} and \end{myenvironment}.
I tried yasnippet mode, but this works only for predefined snippets. So I have, for example, to define a keyword myenv and it will only autocomplete the snippet for the environment if myenv + TAB is entered and not when only my + TAB is entered (with a list of possible completions) or if I type myenvi + TAB.
I also tried predictive-mode which seems to complete only words.
EDIT: I know the AUCTeX way to do this via C-c C-e. The difference to the desired TeXStudio approach is that you have to give a key sequence first and then input a few letters of the environment name, whereas in TeXStudio it is the other way around (which is what I am asking here).