为什么 emacs 24 找不到我添加的自定义主题?

2024-01-01

我的整个 emacs 设置是here https://github.com/metaperl/emacs

我加载了 init-theme.el 文件here https://github.com/metaperl/emacs/blob/master/init/init.el#L14

据说这应该使黑暗清洁主题 https://github.com/metaperl/emacs/blob/master/themes/darkclean.el可用的。

但是当我打字时M-x load-theme TABdarkclean 主题未列出。

如何为 Emacs 24 注册它?


如果您通过安装主题elpa / package.el您会注意到您需要将每个主题文件夹添加到您的custom-theme-load-path- 手动执行此操作有点痛苦,特别是当您考虑到升级将创建一个新文件夹时,例如0.1.0 -> 0.1.2 将是您的文件夹中的一个新文件夹elpa folder.

假设您已将 elpa 软件包安装到~/.emacs.d/elpa/将此脚本添加到您的~/.emacs.d/init.el

(require 'dash)
(require 's)

(-each
   (-map
      (lambda (item)
      (format "~/.emacs.d/elpa/%s" item))
   (-filter
      (lambda (item) (s-contains? "theme" item))
      (directory-files "~/.emacs.d/elpa/")))
   (lambda (item)
      (add-to-list 'custom-theme-load-path item)))

你需要dash.el and s.el(可从 elpa 获取。)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么 emacs 24 找不到我添加的自定义主题? 的相关文章

  • 如何在 emacs 中自动回答是或否

    I binded function semantic symref to key C c C r like this global set key kbd C c C r semantic symref everytime I presse
  • Emacs如何自动完成C上包含文件的单词?

    如何使 Emacs 完成 C 包含文件中的单词 include
  • 如何使用Emacs运行方案?

    我跟着这个tutorial http jeffcjensen net scheme 并成功安装了Emacs STk Quack 问题是我怎样才能像在 Racket 中那样加载我的程序 在 Racket 中 我可以在上方窗口中编辑代码 输入一
  • 在多个 emacs 缓冲区上执行特定命令

    有没有办法在多个缓冲区上执行 emacs 命令 而不必单独选择它们并在每个单独的缓冲区上执行它 我通常打开与特定正则表达式匹配的多个文件 例如 py并希望启用特定模式 例如hs minor mode or glasses mode在每个上
  • Emacs 启动时出现 24 错误

    我已经使用 emacs snapshot 一段时间了 但最近它崩溃了很多 所以我切换到 Emacs 24 但是一旦我安装并启动它 它就开始显示错误并且不会在我的 init el 中加载任何内容 当我在调试模式下运行它时 我得到了这个 Deb
  • Mac 上的 Emacs 和 MySQL

    我尝试使用 sql mysql 模式 但 emacs 无法找到文件 目录 mysql 但是 我可以从终端访问它 如何将 emacs 中的 mysql 指向 usr local mysql bin mysql setq sql mysql p
  • Emacs 打字骨架对插入也许

    在 Eclipse 中 编辑 Java 代码时 如果我输入一个左括号 我会得到一对括号 如果我然后 输入 第二个括号 它不会插入额外的括号 我如何在 emacs 中得到它 Eclipse 编辑器足够聪明 当我输入闭括号时 它知道我刚刚完成了
  • 基于扩展的 Emacs auto-minor-mode

    I found 这个问题 https stackoverflow com questions 1299193 in emacs how to automatically enable a minor mode based on buffer
  • 如何在Emacs Lisp中脱离maphash?

    我需要提前退出maphash当我找到我要找的东西时 defun find in hash str hash let match nil maphash lambda key value if string prefix p str key
  • 更改 Common Lisp REPL 中文本的颜色

    我想控制 Common Lisp 中显示的文本的颜色 像这样的伪代码 print color red hello blue world 有什么办法可以做到这一点吗 我使用 SBCL 我的 repl 位于 emacs 内 谢谢 您可以使用AN
  • 无法在 Emacs 中打开 plantuml 模式

    我使用的是 Emacs 24 3 1 我安装了MELPA http melpa milkbox net 的版本plantuml mode https github com zwz plantuml mode via M x package
  • ess-rdired:我收到此错误“现在没有 ESS 进程与此缓冲区关联”

    To use ess rdired为了浏览对象 我按照 ESS 手册并将以下内容添加到我的 emacs autoload ess rdired ess rdired View R objects in a dired like buffer
  • 为什么 clojure-mode 用一些卷曲的 f 字符替换 fn ?

    我刚刚开始使用 emacs 入门套件和 clojure 模式 现在 当我输入或粘贴 fn 在 Clojure 模式下进入缓冲区 fn 字符在窗口中被替换为稍微卷曲的小写字母 f 缓冲区已正确保存 但这非常烦人 尤其是当我以艰难的方式发现该功
  • 如何在 Emacs à la Vim 中设置标记?

    I d like to be able to set multiple marks in Emacs like Vim does In Vim you might press m b and that would set a mark at
  • Emacs cperl - 常量块中的缩进

    我正在运行基于 GNU Emacs 24 3 50 2 的 Aquamacs 3 0a cperl 版本是 6 2 当我编辑 Perl 常量块时 我得到了我不想要的额外缩进 use constant ONE gt 1 TWO gt 2 TH
  • 如何在 Emacs shell 缓冲区中获得对“✖”等的支持?

    我正在运行一个进程 如果出现错误 则输出字符 如 Unicode 中定义 但是 如果在 Emacs shell 缓冲区 GNU Emacs 的 Aquamacs 发行版 中运行该进程 我根本看不到错误 使用 braeburn aquamac
  • 让 Emacs 尊重我的默认 shell + 选项

    我正在尝试让我的 Emacs shell 模仿我的标准终端会话 基本上我希望它尊重相同的路径以及命令提示符 到目前为止我有几个问题 找不到 PATH 下面是我正在使用的修复程序 我尝试过另一个修复 到处都是 ascii 颜色代码 我的 mw
  • 如何通过 El-Get 安装 MELPA 软件包?

    El Get 文档说El Get 支持package el https github com dimitri el get el get elpa and packageelMELPA 文档显示如何使用 MELPApackage el ht
  • (Emacs) 文本是只读的?

    所以我在 emacs 中工作 突然 slime repl sbcl 说文本是只读的 嗯 这很好 因为现在我无法在其中输入任何内容 我该如何修复 缓冲区是只读的 可以通过以下方式解决C x C q但正如德鲁和菲尔斯所说 文本是只读的 是非常不
  • Flymake的临时文件可以在系统临时目录下创建吗?

    我目前正在使用以下代码在 emacs 中连接 Flymake 和 Pyflakes defun flymake create temp in system tempdir filename prefix make temp file or

随机推荐