[已解决] Spacemac使用org管理配置遇到问题

我想用org管理spacemacs的配置,配置文件在 “~/.spacemacs.d/init.el”. 下面是代码

(package-initialize)

(setq user-emacs-directory "~/.spacemacs.d")
(require 'org-install)
(require 'ob-tangle)
(org-babel-load-file (expand-file-name "ztlevi.org" user-emacs-directory))

And I get the warning here.

Warning (initialization): An error occurred while loading ‘/Users/ztlevi/.emacs.d/init.el’: Symbol’s function definition is void: loop To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘–debug-init’ option to view a complete error backtrace.

我不想将org文件放到"~/.emacs.d/"下,如何fix这个问题?

提示上写了 --debug-init,那就用 emacs --debug-init 启动 emacs 看看 backtrace(调用栈)。

这里应该是载入顺序的问题,没有loop 就试试提前 (require 'cl-lib),再看情况

最后,其实我都不大想回答不带头像的家伙提的问题- -

这个是启用–debug-init的结果. 提前require了cl-lib还是不行诶。 PS:我俩头像半斤八两好嘛。。

Solved. Thanks.

1 个赞

顺带一提,我放弃了这么配置spacemacs了。不用org管理,启动4.542s, 用org变成6.882s。差距太大了。。。。

应该是 (require 'cl),不过比起 org-babel-load-file,我是在 org 文件里用 org-babel-tangle 生成对应的 el 文件。