Handmade Hero»Forums»Code
2 posts
Emacs Compiling
Hi,
i have just starded watching the Handmade Hero Series. I wanted to set up my stuff exactly as Casey did and there ist just one thing left. How do i compile the Code directly in Emacs. If i type in the command compile it always starts visual studio. Or did he set up a hotkey to do so? I think he doesnt mentioned it in the "Emacs Tutorial" video.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Emacs Compiling
You need to bind a command to something like

1
(compile "build.bat")


so it will run the Handmade Hero build.bat script.

- Casey
2 posts
Emacs Compiling
Thank you!
If anyone has the same problem, I added this to the .emacs file:

1
2
3
4
5
6
7
(defun compile-it ()
  "Make the current build."
  (interactive)
  (compile casey-makescript)
  (other-window 1))

(define-key global-map [f9] 'compile-it )

But don´t ask me what this exactly does. I just c/p it of the other code in the .emacs file and changed stuff until it worked.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Emacs Compiling
Heeiiigou
But don´t ask me what this exactly does. I just c/p it of the other code in the .emacs file and changed stuff until it worked.

That is basically how I built my entire .emacs file :P

- Casey