Chicken Scheme hangs on loading buffer into REPL or autocomplete - Windows 10
Created by: originalsurfmex
Any time I load the buffer into the REPL with C-c C-b
or C-c M-b
, then Emacs hangs until I press C-g
. Sometimes it ends up switching to the REPL, but even when it does the last sexp never gets evaluated.
I can't find a way to debug or find where it's hanging.
This happens on a fresh install with only a few packages. Here is init.el
:
;;-------------------------
;; MELPA
;;-------------------------
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
;; LIST PACKAGES
(setq package-list '(helm
;scheme-complete ;;suspect it messes with chicken & geiser
;chicken-scheme ;;suspect it messes with chicken & geiser
paredit
geiser
slime
restart-emacs
use-package
flycheck
;; sublimity
solarized-theme
zenburn-theme))
; list the repositories containing them
(setq package-archives '(("elpa" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")))
; activate all the packages (in particular autoloads)
(package-initialize)
; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))
; install the missing packages
(dolist (package package-list)
(unless (package-installed-p package)
(package-install package)))
;;-------------------------
;; THA LOOKS
;;-------------------------
(load-theme 'zenburn t)
(set-face-attribute 'default t :font "hack")
(set-frame-font "hack" nil t)
;; other fonts "IBM Plex Mono"
(tool-bar-mode -1)
(scroll-bar-mode -1)
;(desktop-save-mode 1) ;;isn't working right with buffers and geiser
;;-------------------------
;; USE PACKAGE
;;-------------------------
(use-package flycheck
:ensure t
:init (global-flycheck-mode))
;;-------------------------
;; HELM
;;-------------------------
(global-set-key (kbd "M-x") 'helm-M-x) ;; bind to M-x
(helm-mode 1) ;; common Emacs command completion
;;-------------------------
;; flycheck
;;-------------------------
(add-hook 'after-init-hook #'global-flycheck-mode)
;;-------------------------
;; SLIME
;;-------------------------
;; Set your lisp system and, optionally, some contribs
;;(setq inferior-lisp-program "/opt/sbcl/bin/sbcl") ;scbl isn't installed
(setq slime-contribs '(slime-fancy))
(require 'slime)
(slime-setup '(slime-fancy slime-banner))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
(zenburn-theme solarized-theme flycheck use-package restart-emacs slime geiser paredit helm))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
Here is last buffer (in scheme-mode with chicken selected):
(define (test x) (+ x x)) (define (test2 y x) (* x y x y x y))
Here is the REPL:
CHICKEN
(c) 2008-2017, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.13.0 (rev 68eeaaef)
windows-mingw32-x86-64 [ 64bit manyargs dload ptables ]
compiled 2017-12-11 on yves.more-magic.net (Linux)
; loading C:\chicken/lib/chicken/8/chicken-doc.import.so ...
; loading C:\chicken/lib/chicken/8/chicken.import.so ...
; loading C:\chicken/lib/chicken/8/matchable.import.so ...
; loading C:\chicken/lib/chicken/8/lolevel.import.so ...
; loading C:\chicken/lib/chicken/8/regex.import.so ...
; loading C:\chicken/lib/chicken/8/irregex.import.so ...
; loading C:\chicken/lib/chicken/8/srfi-13.import.so ...
; loading C:\chicken/lib/chicken/8/posix.import.so ...
; loading C:\chicken/lib/chicken/8/data-structures.import.so ...
; loading C:\chicken/lib/chicken/8/srfi-69.import.so ...
; loading C:\chicken/lib/chicken/8/extras.import.so ...
; loading C:\chicken/lib/chicken/8/files.import.so ...
; loading C:\chicken/lib/chicken/8/utils.import.so ...
; loading C:\chicken/lib/chicken/8/srfi-1.import.so ...
; loading C:\chicken/lib/chicken/8/csi.import.so ...
; loading C:\chicken/lib/chicken/8/chicken-doc-text.import.so ...
; loading C:\chicken/lib/chicken/8/fmt.import.so ...
; loading C:\chicken/lib/chicken/8/ports.import.so ...
; loading C:\chicken/lib/chicken/8/foreign.import.so ...
; loading C:\chicken/lib/chicken/8/fmt-unicode.import.so ...
; loading C:\chicken/lib/chicken/8/srfi-4.import.so ...
; loading C:\chicken/lib/chicken/8/utf8-lolevel.import.so ...
; loading C:\chicken/lib/chicken/8/sxml-transforms.import.so ...
; loading C:\chicken/lib/chicken/8/chicken-doc.so ...
; loading C:\chicken/lib/chicken/8/fmt.so ...
; loading C:\chicken/lib/chicken/8/fmt-unicode.so ...
; loading C:\chicken/lib/chicken/8/utf8-lolevel.so ...
; loading C:\chicken/lib/chicken/8/sxml-transforms.so ...
; loading C:\chicken/lib/chicken/8/matchable.so ...
; loading C:\chicken/lib/chicken/8/regex.so ...
; loading C:\chicken/lib/chicken/8/apropos.import.so ...
; loading C:\chicken/lib/chicken/8/memoized-string.import.so ...
; loading C:\chicken/lib/chicken/8/unicode-utils.import.so ...
; loading C:\chicken/lib/chicken/8/type-checks.import.so ...
; loading C:\chicken/lib/chicken/8/type-errors.import.so ...
; loading C:\chicken/lib/chicken/8/symbol-utils.import.so ...
; loading C:\chicken/lib/chicken/8/miscmacros.import.so ...
; loading C:\chicken/lib/chicken/8/apropos.so ...
; loading C:\chicken/lib/chicken/8/memoized-string.so ...
; loading C:\chicken/lib/chicken/8/unicode-utils.so ...
; loading C:\chicken/lib/chicken/8/type-checks.so ...
; loading C:\chicken/lib/chicken/8/type-errors.so ...
; loading C:\chicken/lib/chicken/8/symbol-utils.so ...
; loading library posix ...
; loading C:\chicken/lib/chicken/8/srfi-18.import.so ...
; loading library srfi-18 ...
; loading C:\chicken/lib/chicken/8/tcp.import.so ...
; loading library tcp ...
#;14> (test 234235)
((result "((file-test-lock (\"args\" ((\"required\") (\"optional\" _ ...) (\"key\"))) (\"module\")) (test (\"args\" ((\"required\" x) (\"optional\") (\"key\"))) (\"module\")))") (output . ""))
#;18> 468470
#;19> (test2 9 9)
Error: unbound variable: test2
Call history:
<syntax> (test2 9 9)
<eval> (test2 9 9) <--
#;19>