3

I would like to set up a project to be published as HTML using org-mode.

I don't want to litter my .emacs with project definitions, and I was wondering where I could put the (setq org-publish-project-alist) variable.

Can I somehow put it in the same dir?

4

3 回答 3

3

Ryan McGeary 描述了我认为组织 emacs 启动文件的好方法。

更新:
域名emacsblog.org已过期 :(
您可以查看原始链接页面的缓存副本

于 2010-03-24T20:07:39.283 回答
2

您可以在 .emacs.d (或任何地方)中添加一个新文件,然后在 .emacs 文件中执行加载文件。

- 编辑 -

例如,您的 .emacs 中可能包含以下内容

(load (expand-file-name "~/.emacs.d/lisp/personal-org-mode-stuff.el"))

然后将所有自定义内容放入 ~/.emacs.d/lisp/personal-org-mode-stuff.el 中,它将加载该文件并导入所有 .emacs

另一张海报还发布了一个链接,该链接介绍了如何将 lisp 文件添加到加载路径并要求它们。

于 2010-03-24T19:16:58.790 回答
0

如果你根本不手动设置,而是使用 Emacs 的自定义机制来控制这个变量的值,那么如果你在 .emacs 中添加以下两行,你的 .emacs 文件就不会混乱:

(setq custom-file "~/.emacs-custom.el")
(load custom-file 'noerror)

尽管有些人可能会声称您必须在 .emacs 文件中添加两行才能以这种方式整理它,这有点讽刺......

于 2013-02-06T04:09:21.817 回答