# Emacs configuration **Repository Path**: mickey991/emacs-config ## Basic Information - **Project Name**: Emacs configuration - **Description**: 金色飞贼小米的 Emacs 设置分享 - **Primary Language**: Emacs Lisp - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 11 - **Forks**: 5 - **Created**: 2023-05-19 - **Last Updated**: 2025-08-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #+title: 配置文件使用说明 将此文件夹重命名为 =.emacs.d= 放到家目录下, 即可开始使用. * 适用平台 此配置文件在以下平台上经过测试: - Windows, =mysy2= - Windows Subsystem for Linux 2 (WSL2) - Linux (manjaro) - Android, termux (命令行) - Android, Emacs 30 GUI app ([[https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/]]) * =straight.el= 使用方法 关于 Emacs 插件管理, 以及 =package.el= 和 =straight.el= 的介绍, 可以参考我的 B 站视频[[https://www.bilibili.com/video/BV1nm4y117gn/][【省时省力写LaTeX】新手Emacs快速配置与插件管理]]. 我使用 =straight.el= 管理和下载插件. - 安装插件需要 =git=. Windows 用户可使用 =msys2= 安装. - =early-init.el= 文件是必要的, 否则 =package.el= 会自行启动, 与 =straight.el= 冲突 - 第一次启动 Emacs 时, =straight= 会自动下载并安装所有插件. 大概需要 15 分钟. - =straight.el= 和 =package.el= 的大部分 =use-package= 代码块可共用. 只有 =:straight= 关键字需注意. 如: =straight.el= 时的 =:straigt xxx= 要改为 =use-package= 的 =:ensure xxx= * 自动生成 =init.el= =init.el= 由 =emacs-config.org= 通过 =org-babel-tangle= 自动生成. 大多数情况下, 在保存任何在 Emacs 中对 =./.emacs.d/emacs-config.org= 文件的修改时, =.emacs.d/init.el= 也会同步更新, 即使因为各种原因 =init.el= 并未加载完成. 更新也可以通过在 =emacs-config.org= 缓冲区中执行 ~M-x org-babel-tangle~ 触发. * 字体 我使用了一些第三方字体进行界面美化, 如 =Fira Code=, =JetBrains Mono= 等. 若你的电脑中没有相应的字体, Emacs 仍会使用系统默认字体启动. 你可以后续根据个人喜好选择其它字体. =all-the-icon= 字体是 =doom-mode-line= 用于显示一些图标, 需要在第一次启动后通过 =M-x all-the-icons-install-fonts= 手动安装. * 一些不常用功能 在设置的一开始有一个 flag =my/is-turn-on-experimental=, 主要是在默认情况下关闭 =jinx=, =mu4e=, =habitica=, =popper= 等需要额外调试的功能. 如要打开相应功能可以去掉相应代码前对这个 flag 的检查. * 其它依赖软件 - =epdfinfo=: =pdf-tools= 查看 pdf 文件 - =texlive=: LaTeX 文件编译 - =gcc=: =org-roam= 用于编译 =emacsql-sqlite=, 在 Emacs 29 版本以外不必须 - =ImageMagick=: =org-download= (=Windows= 下) 调用 - =enchant= 及 =aspell= 或 =hunspell= 的词典: 用于 =flyspell= 或 =jinx= 的拼写检查 - =mu4e=, =isync=: 用于收发邮件