summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-racket.el9
-rw-r--r--scheme/racket/geiser/user.rkt8
2 files changed, 10 insertions, 7 deletions
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index 0cb4663..6a9847b 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -99,10 +99,11 @@ This function uses `geiser-racket-init-file' if it exists."
(defconst geiser-racket--prompt-regexp "\\(mzscheme\\|racket\\)@[^ ]*?> ")
(defun geiser-racket--startup (remote)
- (when geiser-racket-image-cache-directory
- (geiser-eval--send/wait
- (format ",set-image-cache %S\n'done"
- geiser-racket-image-cache-directory))))
+ (if geiser-racket-image-cache-directory
+ (geiser-eval--send/wait
+ `(:eval (image-cache ,geiser-racket-image-cache-directory) geiser/user))
+ (setq geiser-racket-image-cache-directory
+ (geiser-eval--send/result '(:eval (image-cache) geiser/user)))))
;;; Remote REPLs
diff --git a/scheme/racket/geiser/user.rkt b/scheme/racket/geiser/user.rkt
index 5d3ab32..2eb0cb5 100644
--- a/scheme/racket/geiser/user.rkt
+++ b/scheme/racket/geiser/user.rkt
@@ -93,9 +93,11 @@
(define image-cache
(let ([ensure-dir (lambda (dir)
- (and (path-string? dir)
- (begin (make-directory* dir) dir)))])
- (make-parameter #f ensure-dir)))
+ (if (path-string? dir)
+ (begin (make-directory* dir)
+ (if (path? dir) (path->string dir) dir))
+ (path->string (find-system-path 'temp-dir))))])
+ (make-parameter (ensure-dir #f) ensure-dir)))
(define (geiser-prompt-read prompt)
(make-repl-reader (geiser-read prompt)))