with (x)emacs, how could I run the 'compile' command without separately pressing enter to accept the default command? (I can bind the 'compile' to a key but I'd like the whole thing to happen without separate pressing of enter)

Of course, similar behaviour with some else command would also be ok.