Tuesday, September 3, 2013

Patching up SublimeREPL

Some may find that the SublimeREPL package is not working out of the box for MIT-Scheme, a MsgBox shows up that reads:

no such file or directory

Ok this is the fix:
Sublime -> Browse Packages -> find REPL -> find the folder for Scheme -> Main.sublime-menu

Line 29:

"extend_env": {"INSIDE_EMACS": "1"},

Change it:

"extend_env": {"INSIDE_EMACS": "1","PATH": "/usr/local/bin"},

Try, it should work.

And you may also want to add this to your REPL configuration

Written with StackEdit.

5 comments:

  1. Would you happen to know how this would be done in Windows? I've been trying to figure it out all day to no avail...

    ReplyDelete
    Replies
    1. Hi, sorry for the late reply.
      Try the solution provided by 城主! That's a fancy one.

      In case you really need mit-scheme instead of scm on windows, try this:

      I tried configuring this out on Windows 7. This is what I have found:
      If you installed MIT-scheme on your computer, you should add the executable of mit-scheme.exe to your path.
      For mine, the path is : C:\Program Files (x86)\MIT-GNU Scheme\bin
      Afterwards just try:

      "extend_env": {"INSIDE_EMACS": "1"},

      If it doens't work,
      "extend_env": {"INSIDE_EMACS": "1","PATH": "C:\Program Files (x86)\MIT-GNU Scheme\bin"},

      However, the problem being that the mit-scheme will bring up another new window to run and show the result, not that preferable to me.

      BTW try the solution provided by 城主! That's a fancy one.

      Delete
  2. 1. Add this to your environments: MITSCHEME_LIBRARY_PATH=D:\Program Files (x86)\MIT-GNU Scheme\lib
    2. Change "windows": ["scheme"] to "windows": ["mit-scheme"]

    This is what I have set in this file, which could successfully make the scheme console window show up. However, the file cannot be loaded.

    Any ideas?

    ReplyDelete
  3. Solved this problem finally!

    You could download another implementation for scheme named SCM (http://people.csail.mit.edu/jaffer/SCM.html), which could use "scm -f xxx.scm" to execute scheme file.

    Meanwhile we should also make a little change for the config file we mentioned before, like this:
    "windows": ["scm", "-f", "$file_basename"].

    Then, you could run your scheme program. Enjoy it!

    ReplyDelete
    Replies
    1. Yeah this really works, Thanks for your supplement!

      Delete