Arc Forumnew | comments | leaders | submitlogin
3 points by akkartik 5095 days ago | link | parent

Here's what my as.scm has to remove the need for the pushd/popd:

  (define arc-dir* (getenv "ARC"))
  (define start-dir* (path->string (current-directory)))
  (current-directory arc-dir*)

  (require mzscheme)

  ... ; other requires from as.scm

  (current-directory start-dir*)

  (tl)
Now all I have to do is setup $ARC in my shell startup, and I can run arc from anywhere and load source files transparently from the current directory.


1 point by akkartik 5093 days ago | link

I went to push this idea to anarki, but it turns out there's already magic to call arc from anywhere:

  (parameterize ((current-directory (current-load-relative-directory)))
    (aload "arc.arc")
    (aload "libs.arc"))

-----