Hi! I’m trying to run Sonic Pi through this Emacs package: sonic-pi.el on macOS Catalina 10.15.6. This package is quite old and has not been updated recently. However, it looks like some people were quite successful using it. I’m opening this topic to discuss the various modifications one should make in order to make it run properly.
In order to load the package, I appended the following lines to my config file:
(setq load-path (cons "/Users/my_name/.doom.d/sonic_pi/" load-path)) (setq sonic-pi-path "/Applications/Sonic.app") ; deleted the whitespace (require 'sonic-pi)
Doing so, sonic-pi mode is detected and usable when playing around with
.rb files. However, it looks like some variables are wrongly hardcoded directly inside the
sonic-pi.el file used by the package. The defaults, line 57 and 58 of
(defvar sonic-pi-server-bin "server/bin/sonic-pi-server.rb") (defvar sonic-pi-compile-extensions-bin "server/bin/compile-extensions.rb")
I’ve tried to update these lines so they can reflect the new changes to the internal directory structure:
(defvar sonic-pi-server-bin "app/server/ruby/bin/sonic-pi-server.rb") (defvar sonic-pi-compile-extensions-bin "server/bin/compile-extensions.rb")
Apparently, this isn’t enough. When trying to jack-in Sonic Pi, the following message appears:
Could not find a sonic-pi server in sonic-pi-path.
Has anyone been able to workaround this problem? I’ve seen that some pull requests were made, but not taken into account so far.
PS: note that Doom Emacs is nothing more than a thin Evil/Vim layer on top of a vanilla Emacs instance. A regular version of Emacs may behave just the same.