diff options
author | Grant Shangreaux <grant@unabridgedsoftware.com> | 2022-01-30 20:37:41 -0600 |
---|---|---|
committer | Grant Shangreaux <grant@unabridgedsoftware.com> | 2022-01-30 20:37:41 -0600 |
commit | 9684eefdbd850f4d92f0e16fec9f15b4740722dc (patch) | |
tree | c373a929b1c5a1b41e65a8fe879de573df10fa64 | |
parent | b049200234d51cbbec73a9f107a62ad7e7bc49bb (diff) |
Docs: source block eval notes
include block to set `org-confirm-babel-evaluate` to nil if you want
to not be warned each time
-rw-r--r-- | mafia.org | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -30,10 +30,20 @@ the following source block represents the whole program from a high level: <<game-loop>> #+end_src -If you put your cursor on the block above and press C-c C-c, then you should -be able to press M-x mafia-play and it will prompt you for a number of players. -Then look at the *Messages* buffer, you can either find it through the menu -bar, ~M-x switch-to-buffer~ or C-c C-c the source block below: +If you put your cursor on the block above and press C-c C-c, Emacs will +ask if you want to evaluate the code on your system. This is a good thing, +since you are executing most of the elisp in this file without looking +at it! You can set a variable to allow it to execute automatically, but +its nice to have the safety on. + +#+begin_src emacs-lisp +(setq org-confirm-babel-evaluate nil) +#+end_src + +Now you should be able to press M-x mafia-play and it will prompt you for +a number of players. Enter 4 (lower) will. Then look at the *Messages* +buffer, you can either find it through the menu bar, ~M-x switch-to-buffer~ +or C-c C-c the source block below: #+begin_src emacs-lisp (switch-to-buffer "*Messages*") @@ -43,7 +53,7 @@ bar, ~M-x switch-to-buffer~ or C-c C-c the source block below: i'm going to bring in some dependencies that will make it more like Common Lisp. [[info:cl#Top][cl-lib]] brings in functions and macros. When you see things prefixed with -~cl-~, you'll know its from Common Lisp. [[info:eieio#Top][EIEIO]] provies an OOP layer similar to +~cl-~, you'll know its from Common Lisp. [[info:eieio#Top][EIEIO]] provides an OOP layer similar to CLOS, the powerful object oriented system from CL. #+name: dependencies |