我希望总是在我的home目录的一个名为“note”的特定子目录中调用org-mode。现在,在我的.emacs文件中有一行代码以一种糟糕的方式解决了这个问题:
(add-to-list 'auto-mode-alist '(".*/notes/.*" . org-mode))这将匹配任何/note/目录并调用org-mode。但我不想让org-mode出现在恰好被称为"notes“的每个目录中,只出现在我的home目录中。显而易见的答案并不管用:
(添加到列表‘auto-mode-list’(“~/note/.*”.组织模式))
更复杂的版本比我的elisp技术水平要高一点:
(add-to-list 'auto-mode-alist '('(concat (expand-file-name "~/notes/") ".*") . org-mode))上面给出了一条错误消息,说明:
File mode specification error: (wrong-type-argument stringp (quote (concat (expand-file-name "~/notes/") ".*"))) 发布于 2012-03-07 17:33:19
试一试
(add-to-list 'auto-mode-alist `(,(expand-file-name "~/notes/") . org-mode))https://stackoverflow.com/questions/9598469
复制相似问题