首页 > 解决方案 > 我如何为 Alembic 提供的依赖项命名?

问题描述

如果我在 Emacs Cider 中评估以下内容:

(use 'alembic.still)

(alembic.still/distill '[enlive "1.1.5"])

(require '[net.cgrand.enlive-html :as html])

(html)

...评估 (html) 以查看它是否是可识别的符号会产生“无法解析符号”错误。我正在通过连接到 REPL 的苹果酒对其进行评估。

如何使用 Alembic 提供的依赖项作为别名?

标签: emacsclojurecider

解决方案


您的代码不起作用,因为html这里是名称空间的别名,而不是符号。但是,来自 enlive 的功能应该可以工作:

(use 'alembic.still)

(alembic.still/distill '[enlive "1.1.5"])

(require '[net.cgrand.enlive-html :as html])

(html/html-snippet "<div>Hello world</div>")

推荐阅读