aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorgretchen <gretchen@gnar.cool>2019-11-18 16:33:03 -0800
committergretchen <gretchen@gnar.cool>2019-11-18 16:33:03 -0800
commit228baf459707bae2ad67029a71fbfad674d7324a (patch)
tree8797b8a56ff3b6ddb8bb1cebd2ed7ff073991a8a /README.org
parent4e4deba4b4b305b097bd5406b671e3b84a77ebb5 (diff)
downloadnorns-etc-228baf459707bae2ad67029a71fbfad674d7324a.tar.gz
norns-etc-228baf459707bae2ad67029a71fbfad674d7324a.zip
Example and documentation for emacs integration.
Diffstat (limited to 'README.org')
-rw-r--r--README.org19
1 files changed, 18 insertions, 1 deletions
diff --git a/README.org b/README.org
index 19f8786..636640a 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,7 @@
Get a lua shell or supercollider shell on a norns from the command-line, similar to the shell in the maiden interface.
-Requires nanomsg.
+Requires nanomsg. Install with ~sudo make install~.
#+BEGIN_SRC sh
# get a lua shell
@@ -12,3 +12,20 @@ Requires nanomsg.
./norns_shell ws://norns.local:5556
#+END_SRC
+There's an example in ~example/~ of a project with a Makefile that uploads and loads when ~M-x compile~'d in emacs. This piece of emacs lisp may be helpful if you'd like to ~C-c C-c~ instead.
+
+#+BEGIN_SRC lisp
+(defun recursive-upwards-compile ()
+ (interactive)
+ (if (string-prefix-p "make" compile-command)
+ (let ((directory (locate-dominating-file default-directory "Makefile")))
+ (when directory
+ (cd directory)
+ (compile compile-command)
+ (message directory)))
+ (compile compile-command)))
+
+(add-hook 'lua-mode-hook
+ (lambda ()
+ (local-set-key (kbd "C-c C-c") 'recursive-upwards-compile)))
+#+END_SRC