很喜欢solarized-light主题但是发现切换到这个主题就有一段error: (file-error Cannot open load file No such file or directory dash)
,很奇怪的我根本没装dash这个package和layer,切换到其他theme都没报错
GNU Emacs 25.2.1 (x86_64-apple-darwin16.5.0, Carbon Version 157 AppKit 1504.82) of 2017-05-05
spacemacs是develop分支最新代码
debug -init模式启动没有任何报错,目前使用也没其他影响
dash
是 solarized-theme
的依赖,参见 MELPA
看到了确实是依赖关系,但是发现在additonal-package 安装dash这个依旧启动报错
Dash 要装二进制包到PATH。你估计没装。
不好意思把这dash和另外一个搞混了。
理论上这个包是Spacemacs的必要依赖,你要用C-h P
确认一下是没安装还是装了以后没起作用。
具体怎么装,下载dash.el load-path ?
依赖不是会自动安装的吗?
;;; Usage: /path/to/emacs -nw -Q -l /path/to/test-solarized-light.el
(toggle-debug-on-error)
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-set-key (kbd "M-h") 'backward-kill-word)
(global-set-key (kbd "<f1>") 'help-command)
(define-key isearch-mode-map "\C-h" 'isearch-delete-char)
(setq package-user-dir (format "%s/elpa--test-solarized-light/%s" user-emacs-directory emacs-version))
(setq package-archives
'(("gnu" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/"))) ;; For China mainland
;; '(("gnu" . "http://elpa.emacs-china.org/gnu/")
;; ("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(defmacro try-install (pkg)
`(unless (package-installed-p ,pkg)
(package-refresh-contents)
(package-install ,pkg)))
(try-install 'solarized-theme)
;; ------------------------------------------------------------------
(add-hook 'after-init-hook
'(lambda ()
(load-theme 'solarized-light t)
))
(run-hooks 'after-init-hook)
;;; test-solarized-light.el ends here
脚本跑完之后:
⋊> ls ~/.emacs.d/elpa--test-solarized-light/26.0.50/
archives/ dash-20170207.2056/
gnupg/ solarized-theme-20170430.800/