Sclang_conf.yaml not updated when running SC in emacs

Hello,

I’ve built SC 3.12.2 from the git source on Debian 10 Linux and have also installed the supercollider-emacs package and made additions to my .emacs file. SC works perfectly well from emacs except for one thing: When I edit the quarks to be loaded with Quarks.gui, the ~/.config/SuperCollider/sclang_conf.yaml file is not updated and some strange error messages get printed. eg. If i try to install redUniverse, the following gets printed:

Installing redUniverse
Adding path: /home/iain/.local/share/SuperCollider/downloaded-quarks/redUniverse
ERROR: Could not write to file "/usr/bin"
RECEIVER:
class LanguageConfig (0x55b7ec8b5f80) {
  instance variables [19]
    name : Symbol 'LanguageConfig'
    nextclass : instance of Meta_LastValue (0x55b7eed719c0, size=19, set=5)
    superclass : Symbol 'Object'
    subclasses : nil
    methods : nil
    instVarNames : nil

etc. etc.

If however I try the same thing using scide, sclang_conf.yaml gets updated, the quark installed properly and no error messages result.

Does anyone have any idea why I’m having trouble installing quarks with emacs?

My .emacs file has the following:

(require 'sclang)
(require 'w3m)

Thanks a lot!

Iain

This isn’t the right location for the user configuration directory. It should be ~/.config/SuperCollider if I’m not mistaken.

So it looks like sclang, run from emacs, is not going to the right configuration directory, and (I guess) defaulting to the process’s current working directory, which (again, I guess) is the system global directory for binary executables.

That looks like a bug to me.

hjh

Hi, a bug in supercollider itself or in supercollider-emacs? Note: I realised that the (require 'sclang) and (require 'w3m) in my .emacs file (that I mentioned above) don’t actually do anything and were left over from an earlier installation.

I… am not sure… :confused:

When I run sclang from sc-ide, the IDE specifies which library configuration file to use:

$ ps x | grep sclang
  22106 ?        SLl    0:03 /usr/local/bin/sclang -l /home/dlm/.config/SuperCollider/sclang_conf.yaml -i scqt

If I run sclang from the commandline and I don’t specify -l, then I can install and uninstall quarks, and it updates the default sclang_conf.yaml (same path as above).

So sclang’s default behavior, when the library configuration path is not specified, seems to be OK.

So I guess the problem is sc-el, but I don’t see where the problem might be. By default, the Emacs configuration variable sclang-library-configuration-file is empty, and if it’s empty, sc-el will build the sclang command without -l. So sclang should default to the standard library configuration path.

I have no idea why it isn’t doing that in your system.

hjh

Thanks a lot for the information. I tried putting (sclang-library-configuration-file “~/.config/SuperCollider/sclang_conf.yaml”)
in my .emacs file but it didn’t help. I’ll look into this again later and if I find a solution, I’ll report back. Could be that I need to install the emacs stuff some other way than via the supercollider-emacs package.

Cheers,

Iain

I think supercollider-emacs deb package on debian could be in conflict if you installed SC from source.

The sc-el package has been recently updated. I’d suggest trying the newer version, after uninstalling the supercollider-emacs package.
There’s also a note on specifying the sclang_conf.yaml in the configuration. I see you have tried that, but I’m not sure if it works properly in the older (debian-packaged) version.
At any rate, the sc-el update was somewhat recent and it would be useful to see how it performs on users’ machines, please try it if you have a chance! (Again, remove the debian package first)

Edit: Please be careful not to mix the installation methods. Either install the Quark, OR install it when building (-DSC_EL), but not both.

1 Like

Thanks very much. I installed the quark . Very quick and easy. Just needed to remove some duplicate extensions left over from prior installations and make the the suggested additions to the .emacs file ponting to the quark. There was no need to specify the config file.
All the best,
Iain