我正在尝试通过从Slime GitHub页面进行快速安装来在GNU Emacs中安装和设置SLIME。 https://github.com/slime/slime
我已经按照“设置MELPA存储库”链接中的说明进行操作,该链接要求您将代码添加到.emacs文件中。以下是我的.emacs文件中的代码:
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(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)
;; Set your lisp system and, optionally, some contribs
(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
(setq slime-contribs '(slime-fancy))
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#073642" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#657b83"])
'(compilation-message-face (quote default))
'(cua-global-mark-cursor-color "#2aa198")
'(cua-normal-cursor-color "#839496")
'(cua-overwrite-cursor-color "#b58900")
'(cua-read-only-cursor-color "#859900")
'(custom-enabled-themes (quote (deeper-blue)))
'(custom-safe-themes
(quote
("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
'(fci-rule-color "#073642")
'(highlight-changes-colors (quote ("#d33682" "#6c71c4")))
'(highlight-symbol-colors
(--map
(solarized-color-blend it "#002b36" 0.25)
(quote
("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2"))))
'(highlight-symbol-foreground-color "#93a1a1")
'(highlight-tail-colors
(quote
(("#073642" . 0)
("#546E00" . 20)
("#00736F" . 30)
("#00629D" . 50)
("#7B6000" . 60)
("#8B2C02" . 70)
("#93115C" . 85)
("#073642" . 100))))
'(hl-bg-colors
(quote
("#7B6000" "#8B2C02" "#990A1B" "#93115C" "#3F4D91" "#00629D" "#00736F" "#546E00")))
'(hl-fg-colors
(quote
("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36")))
'(magit-diff-use-overlays nil)
'(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/"))))
'(package-selected-packages (quote (slime solarized-theme)))
'(pos-tip-background-color "#073642")
'(pos-tip-foreground-color "#93a1a1")
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#073642" 0.2))
'(term-default-bg-color "#002b36")
'(term-default-fg-color "#839496")
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#dc322f")
(40 . "#c85d17")
(60 . "#be730b")
(80 . "#b58900")
(100 . "#a58e00")
(120 . "#9d9100")
(140 . "#959300")
(160 . "#8d9600")
(180 . "#859900")
(200 . "#669b32")
(220 . "#579d4c")
(240 . "#489e65")
(260 . "#399f7e")
(280 . "#2aa198")
(300 . "#2898af")
(320 . "#2793ba")
(340 . "#268fc6")
(360 . "#268bd2"))))
'(vc-annotate-very-old-color nil)
'(weechat-color-list
(quote
(unspecified "#002b36" "#073642" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#839496" "#657b83"))))
(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.
)
接下来,我在GitHub页面上运行以下命令,并尝试下载SLIME:
M-x package-install RET slime RET
执行上述命令时,出现以下错误:
类型错误的参数:stringp,nil
有人知道我为什么会收到该错误或如何解决该问题吗?我正在运行GNU Emacs 25.2.2(x86_64-pc-linux-gnu,GTK +版本3.22.21) 操作系统是Ubuntu 18.04.1 LTS。任何帮助将不胜感激。
编辑:添加回溯-
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\\`https?:" nil nil)
package-install-from-archive([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil])
mapc(package-install-from-archive ([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil]))
package-download-transaction(([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil]))
package-install(slime nil)
funcall-interactively(package-install slime nil)
call-interactively(package-install record nil)
command-execute(package-install record)
execute-extended-command(nil "package-install" "package-install")
funcall-interactively(execute-extended-command nil "package-install" "package-install")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)