Skip to content

Commit

Permalink
Update installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jxa committed Jul 27, 2021
1 parent 225e810 commit e92aa58
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 62 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Ability to distribute via package managers
- Support for `completion-at-point-functions` and `company` via `company-capf`

### Changed
Expand Down
103 changes: 41 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,73 @@
Scel
====
# scel - sclang-mode for emacs

SuperCollider/Emacs interface

## Installation

Installation requirements
-------------------------
The repository contains two subprojects. `/sc` contains the SuperCollider code
required to implement the emacs interface. `/el` contains the emacs-lisp
implementation of the mode. Emacs and SuperCollider have their own package
managers, so it is required to install each half separately.

For the HTML help system, you will need emacs-w3m support.
If you are building SuperCollider from source on Linux, this library (both .el
and .sc files) will be installed by default. To disable it pass the flag
`-DSC_EL=OFF` as a `cmake` option. See the supercollider readme for more info.

### Installing scel quark

Installation (default)
----------------------
The `scel` Quark is required for emacs to communicate with sclang. Evaluate this in the SuperCollider GUI:

By default emacs-lisp files are installed in

`$prefix/share/emacs/site-lisp`

SuperCollider files are put in

`$prefix/share/SuperCollider/Extensions/scide_scel`
``` supercollider
Quarks.install("https://github.com/supercollider/scel");
```

### Installing the emacs mode

The only thing you need to do is loading the sclang interface in your `~/.emacs`:
Install as you normally would install something from MELPA:

```
(require 'sclang)
``` emacs-lisp
(package-install "sclang")
```

For the HTML help system to fully function also add
```
(require 'w3m)
Or using straight.el
``` emacs-lisp
(package! sclang
:recipe (:host github
:repo "supercollider/scel"
:files ("el/*.el")))
```

### On MacOS

Installation (detailed)
-----------------------
If `sclang` executable is not on your path, you may need to add it to your exec-path.

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)
``` emacs-lisp
(setq exec-path (append exec-path '("/Applications/SuperCollider.app/Contents/MacOS/")))
```

for the HTML help system to fully function also add
```
(require 'w3m)
```
## Installation requirements

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):
For the HTML help system, you will need emacs-w3m support, but you can still use without that.

```
includePaths:
[~/SuperCollider/Emacs]
```emacs-lisp
(require 'w3m)
```

(note normally this is not needed as they are put into sclang's library
path during installation with scons).
## Configuration

To fine-tune the installation from within emacs' graphical customization interface, type:

Usage
-----
`M-x sclang-customize`

In order to automatically start sclang when invoking emacs, use the following command line:

```
$> emacs -sclang
```
## Usage

`M-x sclang-start` or open a `.scd` file and press `C-c C-o`

you're now ready to edit, inspect and execute sclang code!
You're now ready to edit, inspect and execute sclang code!


Getting help
------------
## Getting help

Inside an sclang-mode buffer (e.g. by editing a .sc file), execute

Expand Down Expand Up @@ -108,18 +98,7 @@ in your `~/.emacs`:
This ensures that the arrow keys are just for moving through the document, and not from hyperlink to hyperlink, which is the default in w3m-mode.


Customization
-------------

To fine-tune the installation from within emacs' graphical customization interface, type:

`M-x sclang-customize`

In particular, you will have to customize `sclang-runtime-directory'.


Server control
--------------
## Server control

In the post buffer window, right-click on the server name; by default the two servers `internal` and `localhost` are available. You will get a menu with common server control operations.

Expand Down

0 comments on commit e92aa58

Please sign in to comment.