Emacs 基石 2.0
Emacs Bedrock 2.0

原始链接: https://lambdaland.org/posts/2026-09-06-bedrock-v2/

Bedrock 2.0 现已发布,为 Emacs 提供了一套精简、极简的入门工具包。Bedrock 并非一个框架,而是旨在让用户完全掌控自身配置;它提供了一系列带有注释的 `init.el` 和 `early-init.el` 文件,供用户复制并根据需求进行定制。 此次重大更新要求使用 Emacs 31(2026 年 8 月发布),标志着对旧版本支持的终结。主要改进包括: * **标准化**:所有文件现已统一使用 `lexical-binding: t`。 * **现代化**:改进了 tree-sitter 配置,默认启用 `repeat-mode`,并更新了补全功能。 * **精简**:使用 `embark-auto-prefix-help-mode` 替代了 `which-key`,并移除了 `wgrep` 以采用内置功能。 * **用户体验**:增强了主题颜色的统一性及启动行为。 Bedrock 始终保持着“前沿”但稳定的基础定位。由于它专为直接修改而设计,因此没有自动升级路径;建议用户将现有文件与新存储库进行比对,以整合所需的更改。Bedrock 继续优先考虑隐私、简洁和用户自主权,在基础设置中摒弃了遥测和第三方依赖,同时为必要插件提供了可选的配置方案。

**Emacs Bedrock 2.0** 的发布在 Hacker News 上引发了热烈讨论,凸显了社区对 Emacs 持久的热情。Bedrock 旨在提供一套“以内置功能为主”的入门套件,帮助新手在不被臃肿配置所困扰的前提下学习 Emacs,同时仍保留深度定制的自由。 该讨论反映了开发者工具选择的周期性特征,用户常就“VS Code 与 Emacs 与 Vim”的困境展开辩论。许多贡献者分享了自己重回 Emacs 的心路历程,原因多涉及对 VS Code 遥测数据收集及性能下降的担忧。讨论要点包括: * **配置理念:** 用户将 Bedrock 与其他极简发行版进行了对比,并分享了各自经历“配置文件崩溃(dotfile bankruptcy)”的经验。 * **Emacs 现代化:** 讨论涉及词法绑定的采用、Elpaca 等包管理器的演进,以及向内置功能迁移的趋势(例如用原生的 grep-edit 模式取代 wgrep)。 * **编辑器历史:** 资深用户分享了关于 Emacs 起源及其基于 Lisp 环境的深刻见解,进一步巩固了“Emacs 更像是一个操作系统而非单纯文本编辑器”的观点。
相关文章

原文

Bedrock is a minimal, human-crafted starter-kit for Emacs, and today I’m pleased to announce that version 2.0 of Bedrock is available! This release requires Emacs 31, which came out in August 2026. If you are unable to upgrade Emacs that high, you should be able to remove some of the Emacs 31-specific config without too much trouble.

Bedrock is essentially a collection of better defaults for Emacs, and it uses no third-party packages in its base configuration. Part of the appeal of Emacs, of course, is the vast set of packages developed and maintained by the community, so Bedrock includes sample configurations for some of the most popular packages that I, personally, find utterly indispensable.

The idea behind Bedrock is a lot simpler than other “starter kits” or configuration frameworks: Bedrock is just an early-init.el and an init.el that you copy once into ~/.emacs.d/, and then you modify those files directly as your needs grow and your experience with Emacs matures. The files contain enough comments to point you in the right direction when you want to dig into how something works, but not so much as to drown you in a sea of prose when you’re looking for code. The configuration for third-party packages lives in a separate extras/ folder, and you can copy individual packages’ configuration directly into init.el as-needed, or import groups of packages an entire file at a time.

Changes in Bedrock 2.0

This is a major release just because Bedrock is breaking its compatibility with Emacs 29, last released in 2024. Here is a summary of major changes in this version:

  • Bedrock now uses the lexical-binding: t cookie in all its .el files.
  • All packages declared with use-package get installed if not present on the system by default.
  • Use embark-auto-prefix-help-mode instead of which-key if the embark package is loaded.
  • Remove wgrep in favor of built-in grep-change-to-grep-edit-mode.
  • Vastly improved tree-sitter configuration.
  • Nicer isearch configuration.
  • Make the built-in *Completions* buffer auto-update.
  • Turn on repeat-mode by default.

Fixes in this version:

  • Fixed theme colors not being respected.
  • Better suppression of startup message.
  • Miscellaneous little improvements.

These lists are not exhaustive (as that last bullet should make clear) but that’s the gist of it. More details are available in the changelog.

This is very much an incremental improvement—not some total-overhaul of Bedrock. If you’re a happy user of an earlier version of Bedrock, then you might not have any reason to “upgrade”. Emacs is a stable editor (though the level of active development it enjoys is both meaningful and exciting!) and it should come as no surprise that a starter kit made for the “bleeding edge” should be, well, relatively stable itself.

Upgrading from earlier versions of Bedrock

Bedrock does not support any sort of automatic upgrade path, as that would require the Bedrock code to live somewhere other than the init.el file, and the point of Bedrock is that you learn to own your entire config as quickly as possible. Instead, you should compare the commit you cloned/copied your version of Bedrock from with the new main branch and pick what you want to apply.

Thank you

I appreciate all those who have tried out Bedrock and have sent me their feedback. I made Bedrock initially as an exercise in tweaking the builtin options to get something that felt more “usable” to me. From there it turned into a configuration I could give to my friends who expressed some curiosity with Emacs. Now it’s something that way more people than I initially imaged use as a starting point for their Emacs configurations. (I’ll never know how many because no telemetry—yay privacy!) Anyway, a huge thank you to those who’ve submitted bug reports or PRs, and to the wider Emacs community as well! Thanks you your dedication to free and open-source software, you’ve made my life better. I hope Bedrock improves your life as well.

— Ashton

联系我们 contact @ memedata.com