I have started using M-x compile to compile programs in say, C.
What is the most efficient way to run the executable e.g. a.out. At the moment I’m using M-! ./a.out. Basically, what is the best code-compile-run procedure to follow?
Almost all the tutorials mention how compilation is done, but I haven’t seen one which addressed this issue?
Thanks,
Samuel
I often just append the run command at the end of the build:
The
&&will tell the shell to only invokea.outwhen the compilation is successful.Though I often run the program from an existing shell buffer (M-x shell), or from one of many shells that I manage with package very much like screen.