Emacs has been called a text editor with ambitions of being an operating system, and some people semi-seriously refer to it as their operating system. Emacs does not want to be an operating system per se, but it is certainly ambitious. It can be a shell, a web browser, an email client, a calculator, a Lisp interpreter, etc. It’s possible to work all day and never leave Emacs. It would be an interesting experiment to do just that.
Journalists occasionally impose some restriction on themselves and write about the experience. For example, Kashmir Hill did an experiment earlier this year, blocking the Big Five tech companies—Amazon, Facebook, Google, Microsoft, and Apple—for a week each, then finally all in the same week, and wrote a series about her experience. It would be interesting for someone to work only from Emacs for a week and write about it.
Living exclusively inside Emacs would be hard. Emacs applications require effort to discover and learn how to use, and different people find different applications worth learning. Someone doing everything in Emacs for the sake of a story would have to use some features they would not otherwise find worthwhile.
Why stay inside Emacs?
The point of using a calculator, for example, inside Emacs is that it lets you stay in your primary work environment. You don’t have to open a new application to do a quick calculation. Also, since everything is text-based, everything can be navigated and edited the same way.
You may have run into a situation using Windows where some text can be copied, such as text inside an edit box, but other text cannot, such as text displayed on a dialog box. That doesn’t happen in Emacs since everything is editable text. Consistency and interoperability sometimes make it worthwhile to do things inside Emacs that could be done more easily in another application.
Finally, everything in Emacs is programmable. Something that is awkward to use manually might still be valuable since it can be automated.
Examples from recent posts
My previous post was about various ways to compute hash functions. I could have added Emacs to the list. Here’s how you could compute the SHA256 hash of “hello world” using Emacs Lisp:
(secure-hash 'sha256 "hello world")
You could, for example, type the code above in the middle of a document and type Control-x Control-e to evaluate it as a Lisp expression.
I also wrote about software to factor integers recently, and you could do this in Emacs as well. You could pull up the Emacs calculator and type
prfac(161393) for example and it would return a list of the prime factors: [251, 643].
Neither of these functions is best of breed. The
secure-hash function only supports the most popular hash functions, unlike
prfac will work fail on large inputs, unlike PARI/GP. Emacs is ambitions, but not that ambitious. It doesn’t aim to replace specialized software, but to provide a convenient way to carry out common tasks.
3 thoughts on “Journalistic stunt with Emacs”
I did a near-experiment of this sort in grad school when I first learned emacs, doing as much of my work within a single shell window. I figured it would force me to get to a point where I could customize tools and make them work together. Back then, more things were text-oriented, so I didn’t give up as much as someone doing the same thing today would.
I used Emacs as an email client in college. This has gotten harder to do, I suppose because email has gotten more complicated, and so now even some pretty hard-core Emacs folks don’t use Emacs to read email.
I’ve tried a few times to set up email inside Emacs and gave up. Then I made a virtue out of necessity by deciding it’s good to keep email and Emacs separate.
I use Emacs for email! I went the other route – going from other software like Thunderbird to fully using Emacs for email around 2012.
If anyone’s interested, I use notmuch (https://notmuchmail.org/).
Also, it’s a lot easier if you download your email.