How to switch back and forth from SC_IDE to EMACS on MacOS?

Hello,
I have problems using SC concurrently with both EMACS and IDE on MacOS: If I put the sc-el extensions in the user Extensions subfolder, then I can use SC with EMACS, but SC fails to compile in SuperCollider.app (IDE), because the definition of class Document is found twice (“Duplicate class found”?, Discrepancy).
On arch Linux I do not have the above problem. I can in fact start both SuperCollider.app and sclang on EMACS and use them concurrently.
The yay installer on arch puts the files for EMACS, which are contained in folder scide_scel, in this location:
/usr/share/SuperCollider/Extensions/scide_scel
This is the path for extensions that should be available globally (as opposed to per-user basis).
This prevents the error of duplicate class found for Document.
I cannot find a similar location for MacOS.
Commenting out one of the duplicate Document class definitions breaks the interpreter, either in SC_IDE or in EMACS.
How to make it possible to switch back and forth from EMACS to SC_IDE on MacOS? I need this for demonstration purposes.
Thanks in advance,
Iannis Zannos

It’s supposed to compile the scide_ folder conditionally depending on the IDE you’re actually using. It should never compile both scide_scel and scide_scqt (unless somehow the Mac version is not passing the right editor flag when launching sclang).

Can you find the full command line for sclang that’s being used? (Try process monitor.) For the IDE, the command line should include (IIRC) -i scqt; for emacs, -i scel.

The meaning of this flag should be the same in all OSes; if it’s behaving differently in Mac, it’s a bug.

hjh

1 Like

You will want to have the sc-el extensions in your user extension directory under scide_scel for exactly the reason James described. If they’re not under a subdirectory by that name then you need to manually place them there. It sounds like that is your issue. If it’s not then do also check that scel is starting up sclang with that flag.

1 Like

Thank you very much.
This answers my question.
SC works on Mac IDE and EMACs now.
Is the boot command line config documented in sc help? If not, I’ll see if I can write a help file for it somewhere.

Iannis

The sclang CLI is documented via the -h option.

Hello,

The sclang CLI is documented via the -h option.

Yes, thank you.This is useful.

However, I was asking whether SC_IDE app is documented - that is, whether there is help explaining about the options used by the IDE to boot sclang, that concern which folders are compiled / excluded. It seems that in addition to those listed by the include/exclude options of the IDE, there are some hidden directories excluded/included, such as is the case with the sc-el directory. I feel that this should also be documented somewhere for all users. So far, the only info relative to EMACS interface is in the EMACS sc-el repository. It would help if the internal (CLI) options managed by SC_IDE could also be more visible to the user.

Regards,

Iannis Zannos

I think there’s not much in help files, to be honest.

There are default locations – note also that these are different in Mac, Linux and Windows.

  • The main SCClassLibrary folder – on Mac, I think this is within the SuperCollider.app bundle, so you won’t find it directly without right clicking and going into the app package.

  • The system-wide extension directory (under /Library I think – Platform.systemExtensionDir).

  • The user extension directory (probably ~/Library – Platform.userExtensionDir).

It does make sense to have default class library locations – otherwise SuperCollider wouldn’t be able to start up at all, without user intervention.

As noted earlier in this thread, if the sc-emacs extensions are in a folder that is properly named scide_scel and if scel is properly passing -i scel as a command line switch to sclang, then only one of the editor-specific folders will be compiled.

I think that’s reasonable – makes sense to me that scel would document itself.

Reasonable to document the sclang command line options, sure. (Probably one reason why there hasn’t been an effort to document them is because it usually isn’t a problem though.)

hjh

It seems that in addition to those listed by the include/exclude options of the IDE, there are some hidden directories excluded/included, such as is the case with the sc-el directory.

yes, there is an issue for it: Overview of Special folder names for Classes · Issue #4968 · supercollider/supercollider · GitHub

if you have time to make a PR, i’d really appreciate it! everything is explained in the ticket.

Excellent.
Thank you for pointing out the issue.

I’ll get to it and return as soon as I have written a draft of the doc.

Iannis

1 Like

Hello James,

thank for the information. That will help me structure the doc which I

plan to write in response to the github issue discussed below.

Best,
Iannis Z.

1 Like