scel
scel copied to clipboard
README provides incorrect installation instructions
Per #4, "you probably installed the project by copying the folder directly -- you are intended to install it via CMake, which configures sclang-vars.el.in to produce sclang-vars.el."
But README says:
Installation (detailed)
Put all *.el files in emacs' load-path. e.g. if you put them in ~/emacs/, add the following lines to ~/.emacs (or whatever your init file is called):
(add-to-list 'load-path "~/emacs") (require 'sclang)
for the HTML help system to fully function also add
(require 'w3m)
now put all *.sc files in sclang's library path, e.g. if you put them in a non-standard location, such as ~/SuperCollider/Emacs, add the following to ~/.config/SuperCollider/sclang_conf.yaml (Linux) or ~/Library/Application Support/SuperCollider/sclang_conf.yaml (macOS):
includePaths: [~/SuperCollider/Emacs]
(note normally this is not needed as they are put into sclang's library path during installation with scons).
Oh... haha... scons... anybody remember scons?
This needs an update.
I'd only like to add that it would be wonderful to add a little more details how to get this to work on macOS - in cmake I had to specify emacs path to be /Applications/Emacs.app/... and I believe I had to put more things in my .emacs file (set-variable 'sclang-program...?), but I'm not an Emacs user so I can't assess how much of that was my lack of Emacs knowledge, and how much could be provided as explicit installation instructions here...
#28 and #30 are recent issues caused by the incorrect documentation.
We will keep having user issues opened about this until the documentation is corrected.
Here is what I get from trying to (require sclang):
Eager macro-expansion failure: (file-missing "Cannot open load file" "No such file or directory" "sclang-vars")
What are the instructions for installing through Cmake?
Okay okay, here is what I'm trying, following these two comments: About installing in Doom emacs: https://github.com/supercollider/scel/issues/8#issuecomment-748875811 About CMAKE: https://github.com/supercollider/scel/issues/30#issuecomment-648689971
First install package:
(package! sclang-mode :recipe (:host github :repo "supercollider/scel" :files ("el/*.el")))
Install these if do not have em (MACOS):
$ brew install cmake
$ brew install --cask supercollider
Then build with CMAKE (directory for straight.el):
$ cd ~/.emacs.d/.local/straight/repos/scel/sc
$ cmake .. -DSC_EL=ON
$ make
$ sudo make install
THEN this works:
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/SuperCollider")
(require 'sclang)
However, now I get Searching for program: No such file or directory, sclang. Need to update my emacs path or whatever...
A backtrace of the error
a bit of a backtrace
Debugger entered--Lisp error: (file-missing "Searching for program" "No such file or directory" "sclang")
#<subr make-process>(:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel"))
apply(#<subr make-process> (:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel")))
make-process--with-editor-process-filter(#<subr make-process> :name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel"))
apply(make-process--with-editor-process-filter #<subr make-process> (:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel")))
#f(advice-wrapper :around #<subr make-process> make-process--with-editor-process-filter)(:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel"))
apply(#f(advice-wrapper :around #<subr make-process> make-process--with-editor-process-filter) (:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel")))
explain-pause--wrap-make-process(#f(advice-wrapper :around #<subr make-process> make-process--with-editor-process-filter) :name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel"))
apply(explain-pause--wrap-make-process #f(advice-wrapper :around #<subr make-process> make-process--with-editor-process-filter) (:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel")))
make-process(:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel"))
apply(make-process (:name "SCLang" :buffer "*SCLang:PostBuffer*" :command ("sclang" "-iscel")))
start-process("SCLang" "*SCLang:PostBuffer*" "sclang" "-iscel")
apply(start-process "SCLang" "*SCLang:PostBuffer*" "sclang" "-iscel")
sclang-start()
#<subr funcall-interactively>(sclang-start)
apply(#<subr funcall-interactively> sclang-start)
funcall-interactively(sclang-start)
#<subr call-interactively>(sclang-start record nil)
apply(#<subr call-interactively> (sclang-start record nil))
explain-pause--wrap-call-interactively(#<subr call-interactively> sclang-start record nil)
So I add the path...
(setenv "PATH" (concat (getenv "PATH") ":/Applications/SuperCollider.app/Contents/MacOS"))
(setq exec-path (append exec-path '(":/Applications/SuperCollider.app/Contents/MacOS"))
now I do M-x sclang-start.... it turns on! yay!
However I can't evaluate a line yet...
From README:
now put all *.sc files in sclang's library path
What's sclang's library path? How do I know?
What's sclang's library path? How do I know?
Not 100% sure but I think that means the "Extensions" path. On macOS it's in ~/Library/Application Support/SuperCollider/Extensions or something like that
Got it working! Thank you so much @dyfer, that was the step I was missing!
cp -R ~/Library/Application Support/SuperCollider/Extensions/scide_scel ~/.emacs.d/.local/straight/repos/scel/sc/*
Impossible to figure this out from the README, thanks to everyone that has contributed by bringing this up, you are the difference between a silent Emacs and a happy Emacs.
@Sleepful glad to have helped!
Since you went through this setup recently, would you be able to propose changes to the Readme? A PR would be best, but if not then even pointing out how to update which and sections would possibly push this forward.
FWIW, I also struggled through this install recently. I'm on a Mac, using doom emacs config. I would love it if this library behaved like a normal emacs package and we could just pull it from melpa or configure it using straight.el, etc. Instead, every time this repo gets updated I need to deal with the sclang-vars problem...
I'm willing to put in some work, if the community agrees it would be desirable.
I see a few things that would need to be addressed:
- Remove the cmake script
- Convert sclang-vars.el.in to sclang-vars.el
- Require user to
customizethose vars when installing from melpa - scripts which build the linux packages could overwrite sclang-vars.el or use some other mechanism for setting paths (this is the part I know least about)
I have probably missed some things. Please let me know. I have done some work with elisp before but never cmake or platform-specific packaging.