Hi,
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
I tried setting slime-compile-file-options in my .emacs file as follows (eval-after-load "slime" '(progn (setq slime-compile-file-options (append '(:fasl-directory "/tmp/") slime-compile-file-options)) ...)) but that didn't seem to do it.
Then I tried to put the following in my ~/.swank.lisp file (setf swank:*fasl-pathname-function* (lambda (input-file options) (declare (ignore options)) (let* ((str "/tmp/") (dir (filename-to-pathname str))) (assert (char= (aref str (1- (length str))) #/)) (compile-file-pathname input-file :output-file dir)))) but that didn't seem to do it.
Many thanks for any suggestions!
Cheers, David
David Neu david@davidneu.com writes:
Hi,
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
I tried setting slime-compile-file-options in my .emacs file as follows (eval-after-load "slime" '(progn (setq slime-compile-file-options (append '(:fasl-directory "/tmp/") slime-compile-file-options)) ...))
Just remove ' before progn.
Stas Boukarev stassats@gmail.com writes:
David Neu david@davidneu.com writes:
Hi,
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
I tried setting slime-compile-file-options in my .emacs file as follows (eval-after-load "slime" '(progn (setq slime-compile-file-options (append '(:fasl-directory "/tmp/") slime-compile-file-options)) ...))
Just remove ' before progn.
Disregard that, sorry, i didn't check, i thought it's a macro.
David Neu david@davidneu.com writes:
Hi,
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
I tried setting slime-compile-file-options in my .emacs file as follows (eval-after-load "slime" '(progn (setq slime-compile-file-options (append '(:fasl-directory "/tmp/") slime-compile-file-options)) ...)) but that didn't seem to do it.
Then I tried to put the following in my ~/.swank.lisp file (setf swank:*fasl-pathname-function* (lambda (input-file options) (declare (ignore options)) (let* ((str "/tmp/") (dir (filename-to-pathname str))) (assert (char= (aref str (1- (length str))) #/)) (compile-file-pathname input-file :output-file dir)))) but that didn't seem to do it.
And i really did miss what you wanted. `slime-compile-file-options' affects where fasls will go after doing C-c C-k. And there is no currently easy way to specify where fasls from slime itself are going.
Many thanks for the info!
On Thu, Aug 13, 2009 at 11:48 AM, Stas Boukarevstassats@gmail.com wrote:
David Neu david@davidneu.com writes:
Hi,
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
I tried setting slime-compile-file-options in my .emacs file as follows (eval-after-load "slime" '(progn (setq slime-compile-file-options (append '(:fasl-directory "/tmp/") slime-compile-file-options)) ...)) but that didn't seem to do it.
Then I tried to put the following in my ~/.swank.lisp file (setf swank:*fasl-pathname-function* (lambda (input-file options) (declare (ignore options)) (let* ((str "/tmp/") (dir (filename-to-pathname str))) (assert (char= (aref str (1- (length str))) #/)) (compile-file-pathname input-file :output-file dir)))) but that didn't seem to do it.
And i really did miss what you wanted. `slime-compile-file-options' affects where fasls will go after doing C-c C-k. And there is no currently easy way to specify where fasls from slime itself are going.
-- With best regards, Stas.
* David Neu [2009-08-13 16:56+0200] writes:
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
A not-so-simple solution is to modify slime-init-command. After (load ,(expand-file-name loader) :verbose t) add something like (set (read-from-string "swank-loader::*fasl-directory*") <your-location>)
Helmut
Thanks!
On Fri, Aug 14, 2009 at 2:44 AM, Helmut Ellerheller@common-lisp.net wrote:
- David Neu [2009-08-13 16:56+0200] writes:
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
A not-so-simple solution is to modify slime-init-command. After (load ,(expand-file-name loader) :verbose t) add something like (set (read-from-string "swank-loader::*fasl-directory*") <your-location>)
Helmut
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
here's what we use. this way swank stores its fasl's where asdf does (so, if you have asdf-binary-location set up, then slime will store its fasl's accordingly):
(defun load-swank () (let ((*package* (find-package :hu.dwim.asdf))) (format *debug-io* "; Loading swank...~%") (load (system-relative-pathname :swank "swank-loader.lisp")) (format *debug-io* "; Setting up swank...~%") (eval (read-from-string "(progn (setf swank-loader:*fasl-directory* (merge-pathnames (make-pathname :directory `(:relative "slime" ,@(list (swank-loader::slime-version-string)))) (first (asdf::output-files-using-mappings "" (list (system-relative-pathname :swank "")) ())))) (swank-loader:init))")) #+sbcl (unless (find-symbol "SWANK-PROFILE-GET-CALL-GRAPH" (find-package "SWANK-BACKEND")) (format *debug-io* "; Loading up swank-sprof...~%") (load (merge-pathnames "hu.dwim.environment/source/swank-sprof.lisp" *workspace-directory*))) (eval (read-from-string "(setf swank:*globally-redirect-io* t)"))))
hth,
On Sun, Sep 20, 2009 at 6:52 PM, Attila Lendvai attila.lendvai@gmail.com wrote:
I'd like to be able to set the location of the *.fasl files that are ending up in ~/.slime/fasl/..., preferably from my .emacs.
here's what we use. this way swank stores its fasl's where asdf does (so, if you have asdf-binary-location set up, then slime will store its fasl's accordingly):
(defun load-swank () (let ((*package* (find-package :hu.dwim.asdf))) (format *debug-io* "; Loading swank...~%") (load (system-relative-pathname :swank "swank-loader.lisp")) (format *debug-io* "; Setting up swank...~%") (eval (read-from-string "(progn (setf swank-loader:*fasl-directory* (merge-pathnames (make-pathname :directory `(:relative "slime" ,@(list (swank-loader::slime-version-string)))) (first (asdf::output-files-using-mappings "" (list (system-relative-pathname :swank "")) ())))) (swank-loader:init))")) #+sbcl (unless (find-symbol "SWANK-PROFILE-GET-CALL-GRAPH" (find-package "SWANK-BACKEND")) (format *debug-io* "; Loading up swank-sprof...~%") (load (merge-pathnames "hu.dwim.environment/source/swank-sprof.lisp" *workspace-directory*))) (eval (read-from-string "(setf swank:*globally-redirect-io* t)"))))
hth,
-- attila
Many thanks!