Journalistic stunt with Emacs

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.

Journalist experimentJournalists 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 postsMy 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 openssl.

And 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.

.

. More details

Leave a Reply