Arc Forumnew | comments | leaders | submitlogin
ASK: Emacs inferior-arc on Windows
2 points by archie 594 days ago | 7 comments
Hi guys!

I'm trying to configure arc mode in emacs and inferior-arc on MS Windows machine. To this end, I put this content in my .emacs file:

  (add-to-list 'load-path "C:/path/to/anarki/extras")
  (autoload 'run-arc "inferior-arc"
    "Run an inferior Arc process, input and output via buffer *arc*.")
  (autoload 'arc-mode "arc"
    "Major mode for editing Arc." t)
  (add-to-list 'auto-mode-alist '("\\.arc$" . arc-mode))
  (setq arc-program-name "C:/path/to/runarc.bat")
Here's the content of the runarc.bat file:

C:/path/to/Racket.exe -e "(require anarki) (current-directory anarki-path) (anarki-repl)"

Now, arc mode seems to work OK, but here's the problem: when I start arc repl from Emacs (with M-x run-arc), the arc prompt is not displayed. Although I can type in the expressions in repl, nothing is printed back as a result of evaluation. Only when I type in some wrong expressions I get the usual arc error messages printed. It seems like only stderr is printed, but stdout isn't. I don't know what I'm doing wrong and how to correct this. Any help???



2 points by zck 593 days ago | link

I'm a big Emacs fan. I'll check this out when I'm home.

-----

3 points by archie 590 days ago | link

No answer, huh? It's really an annoying problem...

-----

2 points by zck 590 days ago | link

Ah, sorry I missed that. Right now (on Linux), I'm not even getting as far as you are. Upon M-x run-arc, I'm getting this error:

    emacs: /home/zck/programs/arc/arc3.1/arc.sh: Exec format error

    Process arc exited abnormally with code 126

-----

2 points by archie 590 days ago | link

Hmmm, interesting. But I don't have any problem on my linux machine, only Windows is problematic. Here's mine .emacs setup on linux:

  (add-to-list 'load-path "~/.racket/6.4/pkgs/anarki/extras")
  (autoload 'arc-mode "arc"
    "Major mode for editing Arc." t)
  (add-to-list 'auto-mode-alist '("\\.arc$" . arc-mode))
  (setq arc-program-name "~/.racket/6.4/pkgs/anarki/arc -n")
  (add-hook 'inferior-arc-mode-hook
  	    (lambda ()
	      (set (make-local-variable 'comint-use-prompt-regexp) t)
	      (set (make-local-variable 'comint-prompt-read-only) t)))

-----

1 point by akkartik 587 days ago | link

Are you able to get inferior-lisp working on Windows? Maybe the appropriate forum could help with any gotchas there?

If you do figure this out don't forget to come back and tell us!

-----

1 point by zck 588 days ago | link

Oh, weird. Then I'm less able to help you, as I don't have a Windows computer. Sorry about that.

-----

1 point by akkartik 593 days ago | link

I have no experience with Emacs, sadly, but hopefully someone here does and can share a working setup.

-----