【发布时间】:2020-10-15 23:13:12
【问题描述】:
在我的 Spacemacs 配置中,我将我的 org 层配置为像这样扩展它生成的任何乳胶
(org :variables
org-format-latex-options '(:foreground "#90ee90" :background default :scale 2.0
:html-foreground default
:html-background "Transparent" :html-scale 1 :matchers
("begin" "$1" "$" "$$" "\\(" "\\["))
我在多台机器上使用这个配置,我喜欢不同的显示比例不同,所以我写了一个小函数
(defun switch-scale ()
(cond
((equal (system-name) "WMachine") 5.0)
(t 2.0) ;; default
)
)
并且重写了上面的代码,调用了:scale属性中的函数,像这样
org-format-latex-options '(:foreground "#90ee90" :background default :scale (switch-scale)
...
当我在暂存缓冲区中测试 switch-scale 时,它可以正常工作(返回 5.0),但是当我将它添加到我的配置中时,它会在尝试以 org 模式生成乳胶时触发以下错误
Debugger entered--Lisp error: (void-variable \])
eval(\] nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
我不知道发生了什么,似乎 (switch-scale) 没有被评估???
【问题讨论】: