Create a gist now

Instantly share code, notes, and snippets.

Slime Windows-Unix-Path translation (Cygwin)
(require 'clojure-mode "clojure-mode" t)
(require 'slime t)
(when (eq system-type 'cygwin)
(add-hook 'slime-connected-hook (lambda ()
(setq slime-to-lisp-filename-function (lambda (filename)
(replace-regexp-in-string
"\n" "" (shell-command-to-string
(format "cygpath.exe --windows %s" filename))))
slime-from-lisp-filename-function (lambda (filename)
(replace-regexp-in-string
"\n" "" (shell-command-to-string
(format "cygpath.exe --unix %s" filename)))))) t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment