Why 'living in Emacs' works: it turns everything into a client-server call
Charles Choi pushes back on the tired claim that Emacs is an operating system, offering a more precise framing: Emacs sits above the OS kernel and orchestrates system services and external programs, which is what lets people run so much of their computing life inside it. The unifying idea is the client-server model. Because Emacs ships with built-in access to the file system, network, and other OS facilities—plus the ability to shell out to any command-line tool—almost any resource can be treated as a service that Emacs consumes as a client.
Choi breaks a client into three responsibilities—user interface, the ‘client edge’ that handles communication (URL, TCP/UDP sockets, SMTP, serialization), and a local data store (collections, SQLite)—and notes that Emacs has built-in or third-party Elisp libraries covering each. Elisp is the glue: as a dynamic language it supports run-time improvisation, wiring together native functions and shell commands into arbitrary client behavior. Any existing CLI utility can simply be reframed as the ‘service’ behind a shell call.
A worked example builds a wttr command that prompts for a location, fetches JSON from the wttr.in weather service, parses it into a hash table, and prints the result in the minibuffer—about 67 lines of Elisp. If that’s too much, the network and JSON work can be offloaded to a small Python script invoked from a one-line Elisp command. The takeaway for developers: Emacs offers high-level abstractions that make it cheap to stand up custom clients, blurring the line between editor and general-purpose integration environment.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.