repl-electric / sonic-pi.el

Emacs running SonicPi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server path in Ubuntu packages breaks expected configuration

rrmdev opened this issue · comments

Due to a recent reconfiguration of my system, I re-installed Sonic Pi and sonic-pi.el.
This time, though, I installed the Sonic Pi binaries via Ubuntu PPA:
sonic-pi-net/sonic-pi#827

As could be expected, the paths are different from those created by building from the repository.

Long story short. I set the following additional settings in my .emacs

(setq sonic-pi-server-bin             "server/bin/sonic-pi-server.rb")
(setq sonic-pi-compile-extensions-bin "server/bin/compile-extensions.rb")
(setq sonic-pi-path "/usr/lib/sonic-pi/")

Like this (and considering issue #11), I now have a functioning Sonic Pi controlled through emacs.

Would you like to have the emacs mode packaged for Debian, as well?

Not really. I much prefer it remain in MELPA. I do not think that the target user for Sonic Pi is an emacs aficionado, so it would just be dead weight in the Sonic Pi Debian package.

A note in the configuration file, a warning in the docs or (at an extreme most) a routine to check where the Sonic Pi files are could work fine.

The greatest problem I see is hardcoding the path of the bin files. My suggestion would be to define only the name of the binary files in the first two variables, and the path to the binaries elsewhere. E.g.:

(setq sonic-pi-server-bin             "sonic-pi-server.rb")
(setq sonic-pi-compile-extensions-bin "compile-extensions.rb")
(setq sonic-pi-path "/usr/lib/sonic-pi/server/bin/") ; or a different variable if this one is used elsewhere
; (setq sonic-pi-bin-path "/usr/lib/sonic-pi/server/bin/") 

In this manner, the user should only set 'sonic-pi-path' or 'sonic-pi-bin-path', since it is unlikely the binaries themselves will be renamed.

For the time being Sonic Pi is not in the official Debian/Ubuntu repositories, so I imagine most users are building and placing their Sonic Pi files pretty much anywhere.

Sonic Pi just entered Debian Sid and will enter Ubuntu Universe en suite.

https://packages.debian.org/search?searchon=sourcenames&keywords=sonic-pi

Oh, OK... Great news.
As for packaging sonic-pi.el for Debian, you should contact the developer @josephwilk (https://github.com/josephwilk) to have his take on the issue.

@hzulla I'm happy with the way it is (not a Debian package). Unless anyone has any objections.