Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README provides incorrect installation instructions #22

Open
jamshark70 opened this issue Feb 29, 2020 · 10 comments
Open

README provides incorrect installation instructions #22

jamshark70 opened this issue Feb 29, 2020 · 10 comments

Comments

@jamshark70
Copy link

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.

@dyfer
Copy link
Member

dyfer commented Apr 22, 2020

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...

@jamshark70
Copy link
Author

#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.

@Sleepful
Copy link

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?

@Sleepful
Copy link

Sleepful commented Jun 10, 2021

Okay okay, here is what I'm trying, following these two comments:
About installing in Doom emacs:
#8 (comment)
About CMAKE:
#30 (comment)

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...

Some more info here just in case

@Sleepful
Copy link

Sleepful commented Jun 10, 2021

From README:

now put all *.sc files in sclang's library path

What's sclang's library path? How do I know?

@dyfer
Copy link
Member

dyfer commented Jun 10, 2021

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

@Sleepful
Copy link

Sleepful commented Jun 11, 2021

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/*

@Sleepful
Copy link

Sleepful commented Jun 11, 2021

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.

@dyfer
Copy link
Member

dyfer commented Jun 11, 2021

@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.

@jxa
Copy link

jxa commented Jun 11, 2021

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 customize those 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants