I'm regularly compiling some C programs and one thing is annoying : after I've compiled, I'm opening a shell with `M-x shell ./foo`, but the shell open in place of my source code. 
I would like the shell buffer to open in place of the compilation frame, which I don't really need anymore. Otherwise, it's an overkill.

I've read about this topic [open buffer in a specified frame][1] but my emacs lisp competence are not that great and I can't adapt it to my case.

Thanks in advance! I guess I'm not the only one it can help.


  [1]: http://emacs.stackexchange.com/questions/5745/open-buffer-in-a-specified-frame