Arc Forumnew | comments | leaders | submitlogin
5 points by nex3 5905 days ago | link | parent

My .emacs, as it relates to Arc:

  (autoload 'run-arc "inferior-arc" "Run an inferior Arc process, input and output via buffer *arc*." t)
  (autoload 'arc-mode "arc" "Major mode for editing Arc." t)
  (add-to-list 'auto-mode-alist '("\\.arc$" . arc-mode))
I also have arc.el and inferior-arc.el in my loadpath.

As for starting the REPL, inferior-arc.el assumes that there's an "arc" program in your path. I did this by adding a symlink pointing to my arc.sh, but you could also customize the arc-program-name variable.



1 point by eds 5905 days ago | link

Thanks. It still doesn't auto-indent though...

And I'm on Windows so I can't use arc.sh :( ... I tried to make up for it by using arc-exe instead, but arc-exe won't load if it isn't in the same directory as ac.scm. (I think this is because the require-namespace isn't done at compile time like normal requires are.)

-----

1 point by nex3 5905 days ago | link

For auto-indenting: you are pressing tab, right?

You should be able to set up a simple CMD script to start Arc on Windows. I think. I don't actually know that much about Windows. At the very least, you can set arc-program-name to be a manual invocation of MzScheme.

-----

1 point by eds 5904 days ago | link

Oh, thats what you mean by auto-indenting. I was expecting it to act like lisp mode where it indents when I press enter (which would be nice to have if someone could manage it).

My problem so far is that when I try to load arc, because the current working directory is not the arc directory, even if it loads as.scm correctly, it can't load ac.scm or any *.arc files. I could set it up to load something like "mzscheme -mf C:\...\arc\as.scm" but I don't know how to make mzscheme look for other arc files in that directory as well.

-----

2 points by nex3 5904 days ago | link

The standard Emacs indentation behavior is to indent on TAB rather than newline. This is also the default for Lisp-mode, as far as I know. You can rebind this by setting RET to comment-indent-new-line, though.

You need to add some argument to mzscheme to get it to cd into the arc directory. Check the args passed in arc.sh.

-----

1 point by eds 5904 days ago | link

Ok, thanks. I hacked a batch file and put it in my PATH so I can start arc from emacs. (Setting arc-program-name failed because run-arc wouldn't respect the quotes around the executable name.)

-----