我的 Emacs 31 贡献
My Emacs 31 contributions

原始链接: https://xenodium.com/my-emacs-31-contributions

作者在 Emacs 31 中提交了若干小功能,包括 Dired 中隐藏绝对目录路径的选项、为 Emacs 的 Info.plist 添加 macOS 语音识别权限支持、带有 macOS 选择器支持和可扩展处理器的“发送到…”/`send-to` 共享功能,以及通过实现 `selectedRange` 恢复 macOS 听写。作者还反思了 FSF 版权流程、Emacs 的长寿,以及资助开源维护者的重要性。

一篇 Hacker News 帖子链接到 Álvaro Ramírez 关于为 Emacs 31 贡献的博文。评论者称赞他的 Emacs 包,特别是 agent-shell.el 和 acp.el,是强大的 AI/ACP 工具。讨论涵盖 Emacs 50 年的长寿与可定制哲学,以及因 GNU/FSF 版权转让文书工作导致向上游贡献的挑战,有些人认为其繁琐且缓慢。其他人则认为这种官僚流程是执行 copyleft 所必需的。帖子还涉及开源可持续性,指出自由软件往往无法支付维护者的账单。一些用户说 Emacs 具有现代 GUI 和文本塑形支持,而另一些人指出配置它需要努力但有回报,尤其是结合实时 AI 集成。总体而言,对话混合了欣赏、流程批判与对 Emacs 持久作用的反思。
相关文章

原文
My Emacs 31 contributions

For me, landing changes in Emacs upstream always felt somewhat out of reach, so I kinda postponed it for a long while. Perhaps the biggest hurdle was getting over the process to assign copyright to the Free Software Foundation, which does feel a bit archaic (download, sign, and return a PDF) and slow (mostly waiting for an email response), though hey, I have nothing but sympathy. Open source is unsustainably tricky. As consumers, we often like free as in freedom and free as in beer, but neither pay the bills. We hope some company steps in to fund these projects, but that rarely happens. As a result, most open source projects are starved (even popular ones), run by volunteers working for free.

All that is to say, if the upstream Emacs contribution/onboarding process seems less than ideal, cut it some slack. The project as a whole primarily runs on the blood, sweat, and tears of unpaid contributors. If you can, fund the maintainers you rely on (or better yet, get your employer to do so).

If you've been thinking of contributing to Emacs upstream, don't procrastinate like me and just give it a try. Compared to the typical GitHub pull-request process, your first Emacs contribution may feel a little daunting and dated, but there's a lovely fuzzy light at the end of the tunnel. You see, Emacs has been around for 50 years. Very few software projects get to live this long. Landing contributions on a project with such a rich history is a real treat!

But I digress… Let's get moving. Once I got over procrastinating, I finally got a handful of small contributions landed on the master branch. Thank you, Eli Zaretskii, Stefan Kangas, and Gerd Möllmann, for your help. From then on, I eagerly waited for them to formally make it to a stable release.

Emacs 31 shipped the lot.

Hide Dired's absolute location

I do enjoy a visual (and functional) tweak here and there, and a Dired tweak felt small enough to be the perfect candidate for my very first Emacs contribution.

With that in mind, I tweaked dired-hide-details-mode by adding the dired-hide-details-hide-absolute-location user option, which hides the directory's absolute path, typically displayed at the top of Dired buffers (bug#72272, commit).

More on this in my Hide another detail post.

macOS speech recognition permission

At some point, I ran into a snag trying to run macosrec from my beloved eshell. The process just crashed with a cryptic abort trap: 6, so the issue wasn't super obvious. It turned out the utility required granting an OS permission that can only be requested by the host app (Emacs) if it includes the relevant description in its Info.plist file.

As of version 31, Emacs includes NSSpeechRecognitionUsageDescription in its Info.plist (bug#72827, commit).

Send to… (aka macOS sharing)

context-menu-mode now includes a "Send to…" item, enabling sending the current file(s) or region text to external apps or services. You can also invoke M-x send-to directly. On macOS, it's powered by the native sharing picker (I use it frequently to AirDrop things to my iPhone). Elsewhere, it falls back to shell-command-do-open (bug#76120, commit, follow-up fix). These two implementations plug into new generic plumbing (send-to-handlers), so you could, for instance, add a handler sharing via Android's native share sheet (android-browse-url can do the heavy lifting) or KDE Connect on Linux (kdeconnect-cli --share).

More in my Emacs send-to (aka macOS sharing) merged upstream post.

macOS dictation is back

Emacs 30 lost macOS dictation when migrating to NSTextInputClient. Implementing selectedRange in nsterm.m brought it back (bug#79070, commit). With LLMs/agents being a thing these days, dictating into your Emacs buffer may be just the thing to complement your AI workflow.

I covered this in my macOS dictation returns to Emacs (fix merged) post.

Make it all sustainable

Are you getting value from any of my upstreamed changes or my Emacs packages? Please consider sponsoring to keep the work going. While my patches may seem relatively straightforward, some took quite a bit of effort to land upstream.

My Emacs work not your cup of tea? No worries. As mentioned earlier, sponsor the maintainers you rely on instead.

powered by LMNO.lol

privacy policy · terms of service

联系我们 contact @ memedata.com