Problems using (debug-repl) with emacs racket-mode

35 views
Skip to first unread message

primer

unread,
Oct 14, 2020, 8:48:43 PM10/14/20
to Racket Users
I'm trying to use (debug-repl) in the following simple program:

#lang racket
(require debug/repl)

(define (add a b)
  (debug-repl)
  (+ a b))

(add 4 5)

If I run this in Dr. Racket, then I get a repl prompt as expected.  However, I'm using Greg Hendershott's racket-mode for emacs, where it blows up with the following:

;
; Welcome to Racket v7.8.
;
>
; cache-set!: contract violation
;   expected: path-string?
;   given: #f
;   in: the 6th argument of
;       (->
;        path?
;        syntax?
;        syntax?
;        string?
;        namespace?
;        path-string?
;        any)
;   contract from: (function cache-set!)
;   blaming: d:\data\prj\EmacsUnification\emacs\home\.emacs.d\elpa\racket-mode-20200924.1506\racket\syntax.rkt
;    (assuming the contract is correct)
;   at: d:\data\prj\EmacsUnification\emacs\home\.emacs.d\elpa\racket-mode-20200924.1506\racket\syntax.rkt:89.18

I'm not sure if this is a bug or a setup issue.  FWIW, I'm setting up racket-mode in my .emacs file as follows:

(use-package racket-mode)
(add-to-list 'auto-mode-alist '("\\.rkt\\'" . racket-mode))
(require 'racket-xp)
(add-hook 'racket-mode-hook #'racket-xp-mode)
(add-hook 'racket-xp-mode-hook
           (lambda ()
             (remove-hook 'pre-redisplay-functions
                           #'racket-xp-pre-redisplay
                           t)))

Has anyone had any luck getting these two things to play nice?


Greg Hendershott

unread,
Oct 20, 2020, 9:31:33 AM10/20/20
to Racket Users
To post back to the list, this was resolved:

Reply all
Reply to author
Forward
0 new messages