What is your emacs configuration? (+ my personal bugs)

Hi folks,

I am quite new to emacs, but already convinced of the power of this tool.
I would be very interested if you could share some configurations (.el files) or tips that go with super-collider.
I am sure others would be curious as well !

Thanks in advance !

Great tool indeed.

I use Doom-Emacs (in evil-mode) with sclang and sclang-extensions packages.

It works great, both for developing and live coding in SC.

So far, I simply added the sclang package, and the following lines in my init.el (I am under Ubuntu)

(add-to-list 'load-path "~/.local/share/SuperCollider/downloaded-quarks/scel/el")
(require 'sclang)


I don’t really know what to add more, if there are additional tweaks that worth it and goes well with it.

  • Curiously, I systematically have a bug when working in emacs with a .sc file: After calling sclang-start then booting the server, when navigating through a document, the mini buffer throws me an error SCLang: Error in command handler, which only goes away when calling the function sclang-ac-mode (the auto complete mode).

  • When I add the package sclang-extension, I got other kind of errors when sclang-ac-mode is activated. When I type some code into the buffer, or simply move the cursor around the text, for example

{SinOsc.ar(440);}.play

the post window continuously throws me errors that look like

ERROR: Parse error
  in interpreted text
  line 1 char 30:

  try { Emacs.message((({SinOsc).class).asCompileString) } {|err| err;} 
                               ^
-----------------------------------
opening bracket was a '{', but found a ')'
  in interpreted text line 1 char 30
ERROR: syntax error, unexpected BADTOKEN, expecting '}'
  in interpreted text
  line 1 char 30:

  try { Emacs.message((({SinOsc).class).asCompileString) } {|err| err;} 
                               ^
-----------------------------------
ERROR: Command line parse failed
ERROR: Class not defined.
  in interpreted text
  line 1 char 37:

  try { Emacs.message((Meta_Meta_SinOsc.methods.collect {|m| [m.name, m.argList, m.ownerClass] }).asCompileString) } {|err| err;} 

Any idea?

I reduced my configuration in my init.el to these simple lines, and I still get the errors

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless package-archive-contents (package-refresh-contents))

(add-to-list 'load-path "/home/sly/.local/share/SuperCollider/downloaded-quarks/scel/el")
(require 'sclang)

(require 'sclang-extensions)
(add-hook 'sclang-mode-hook 'sclang-extensions-mode)

I did some digging, and found that the those error messages shown in the consol come when either of the following three modes are activated: sclang-ac-mode, sclang-doc-mode, sclang-extensions-mode. It looks like they appear when those modes should enter in action. For example, when finishing typing SinOsc., putting the last dot triggers the following error in the post window:

ERROR: Class not defined.
  in interpreted text
  line 1 char 37:

  try { Emacs.message((Meta_Meta_SinOsc.superclasses).asCompileString) } {|err| err;} 

The only solution so far is to disable sclang-extension-mode, and all the other modes.