Emacs Embraces macOS Sharing After Heated Open Source Debate
Share this article
In February, developer Álvaro Ramírez set out on what seemed like a long shot: contribute a patch to GNU Emacs enabling native macOS sharing. While users craved the feature, Ramírez faced skepticism—GNU guidelines historically resist prioritizing non-free operating systems like macOS over GNU/Linux. As he detailed in a personal blog post, the ensuing discussion was a "turbulent" clash of ideals that nearly killed the proposal. Yet, against the odds, the patch was merged upstream this week, reborn as the versatile send-to command.
The Ideological Firestorm
At the heart of the controversy was the GNU project's commitment to software freedom. GNU's policies discourage features targeting proprietary systems unless they can be generalized across platforms. Ramírez's initial patch leveraged macOS-specific APIs like NSSharingServicePicker, sparking intense debate on the Emacs-devel mailing list. Critics argued it violated core principles, while supporters emphasized real-world usability for macOS users. Even GNU founder Richard Stallman weighed in, adding weight to the discourse.
"My hopes of landing the patch after initial feedback quickly shrank to almost non-existent," Ramírez admitted. Yet, he credits maintainers Eli Zaretskii and Stefan Kangas for steering the conversation toward compromise. Their intervention reframed the patch as a cross-platform solution, avoiding a stalemate.
How Send-To Works: A Technical Win
The merged feature, accessible via M-x send-to or Emacs' context menu, lets users share files, buffers, or text regions using configurable handlers. Key technical elements include:
Platform-Agnostic Design: The reworked patch uses
send-to-handlers, allowing different implementations per OS. Out of the box, it ships with:- A macOS handler using native sharing dialogs.
- A generic handler via
shell-command-do-openfor Linux/other systems.
Extensibility: Developers can now create handlers for integrations like KDE Connect, Android intents, or GSConnect, turning
send-tointo a gateway for custom workflows.
;; Example: Trigger send-to on selected text
(use-package send-to
:ensure nil ; Built-in on master branch
:bind ("C-c s" . send-to-region))
Why This Matters Beyond Emacs
This saga reflects broader tensions in open source: balancing purity with practicality. For developers in mixed-OS environments—like Ramírez, who uses macOS for daily work—the patch demonstrates how flexibility can coexist with freedom. The five-month effort also spotlights the Emacs community's resilience; constructive dialogue transformed a divisive proposal into an inclusive tool. As Ramírez notes, it "raises the tide" for all users, enabling richer interactions without compromising on configurability.
Looking ahead, send-to invites a wave of community contributions. Ramírez encourages others to build handlers, promising that even small enhancements can ripple through ecosystems. For now, macOS users gain a seamless sharing experience—a testament to what’s possible when ideology meets ingenuity in the open source arena.