gpt4 book ai didi

emacs - 将 chezschme 设置为 geiser-default-implementation

转载 作者:行者123 更新时间:2023-12-04 10:46:27 25 4
gpt4 key购买 nike

我安装了chezscheme

$ chezscheme
Chez Scheme Version 9.5
Copyright 1984-2017 Cisco Systems, Inc.

> (define a (list 4 5 6 ))
> (set-car! a 9)
> a
(9 5 6)

并将其配置为 geiser-default-implementation
(require 'geiser)
(setq geiser-active-implementations '(chez guile racket chicken mit chibi gambit))
(add-hook 'scheme-mode-hook 'geiser-mode)
(setq geiser-default-implementation 'chez)

尽管如此,当使用 org src 发出 C-c C-c
#+begin_src scheme :session sicp :lexical t
(define a (list 2 3 4))
(set-car! a 9)
a
#+end_src

#+RESULTS:

它缓冲了很长时间,提示在迷你缓冲区中“chez go and up”

但改为运行 MIT-scheme。

错误:
MIT/GNU Scheme running under GNU/Linux
Type `^C' (control-C) followed by `H' to obtain information about interrupts.

Copyright (C) 2019 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Thursday September 5, 2019 at 11:51:46 AM
Release 10.1.10 || Microcode 15.3 || Runtime 15.7 || SF 4.41 || LIAR/x86-64 4.118
;Warning: Invalid keyword: "/home/me/.emacs.d/.local/straight/build/geiser/scheme/chez/geiser/geiser.ss"
;Warning: Unhandled command line options: ("/home/me/.emacs.d/.local/straight/build/geiser/scheme/chez/geiser/geiser.ss")


额外的:

添加 geiser-chez-binary
(setq geiser-active-implementations '(chez guile))
(setq geiser-chez-binary "chez")
(add-hook 'scheme-mode-hook 'geiser-mode)
(setq geiser-default-implementation 'chez)

并运行
#+begin_src scheme   :session sicp :lexical t :results output
(define b (list 3 4))

#+end_src

它报告
    apply: Searching for program: No such file or directory, chez

然后我附加 chezorg-babel-do-load-languages并将关键字方案更改为 chez
#+begin_src chez   :session sicp :lexical t :results output
(define b (list 3 4))

#+end_src

它报告:
  No org-babel-execute function for chez!

删除了 mit-scheme 包,它可以工作

enter image description here

最佳答案

默认情况下,Geiser 认为 Chez Scheme 的可执行文件是 scheme ,然而,事实并非如此,Chez Scheme 使用 chez和 Mit Scheme 使用 schememit-scheme .您需要将以下内容放入您的 Emacs init 文件中:

(setq geiser-chez-binary "chez")

这是 geiser-chez-binary的文档字符串(我已经将其更改为 chez):

geiser-chez-binary is a variable defined in `geiser-chez.el'.
Its value is "chez"
Original value was "scheme"

Documentation:
Name to use to call the Chez Scheme executable when starting a REPL.

You can customize this variable.

关于emacs - 将 chezschme 设置为 geiser-default-implementation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59682962/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com