I once complained to my friend of his desktop on his computer. His desktop was a tangled mess of icons. "It's easier this way.", he chuckled, "I can quickly find all the softwares I need.". I showed him my desktop which was spick and span."Doesn't it consumes time in finding the softwares you need?", he asked. I told him I have all the softwares I need on my desktop. His eyes rolled down my screen until they stumbled upon a solo icon of emacs. "You just use one software?", he asked."Mostly, yes", I said. "What about *editing*, *browsing*, *music*, etc?", he asked. "I do it all in emacs.", I quipped. Before he raised his eyebrows, I explained to him why emacs is informally called as a complete operating system and why I never close emacs.
This article has been published in LinuxforYou magazine,January 2014 issue
Note: For those who are unfamiliar with emacs, Key abbreviations used :
Emacs is modeless editor which mean that unlike vim, you can start inserting text as soon as you open it. This is one of the reason why it’s popular with newbies. But that doesn’t mean you can’t get your hands dirty with emacs.
Most people criticize emacs user for trying to do everything with emacs except editing. So let’s begin with editing for which emacs was initially built.
Emacs can handle pretty much any type of file. Just type
$ emacs myFile.ext
Emacs also does syntax highlighting and indentation. It usually follows GNU style of indentation. The best thing about emacs is that you can customize it the way you want. I usually like Allman indentation when editing
C code with
4 spaces. To change it, add this to your
Emacs by default creates a backup file for every file it edits. It’s usually named as the original file followed by tilde like FileName~. Though backup files are life saver, they are difficult to manage if they accumulate on the same folder. To save all your files in one place, let’s say in folder
.saves, add this to your
w3m.el which uses
w3m which itself is a
text-browser. Of course there are
Lynx and other text editors, but integrating w3m with emacs is very fast.
Here’s a snapshot of my website in emacs.
How about integrating emacs to view your email. You could do this by
GNUS. Add this to your
Replace user with you’re gmail username.Also add this to your
machine imap.gmail.com login firstname.lastname@example.org password secret port 993 machine smtp.gmail.com login email@example.com password secret port 587
The password field is optional. Type
M-x gnus to start GNUS. To compose email, type
C-c C-c to send mail.
The other task I usually do is look up few photos. Emacs can do more than just viewing the pictures, it has an inbuilt powerful power editor called
Image-Dired. Simply press
M-x image-dired on your emacs.
This is one of the feature I find unparalleled to emacs. The official website says about org mode, “Org mode is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system”.
If you love LaTeX, then there are more reasons to love
org mode. You could integrated TeX support and export your work in PDF.For this add this to your ~/.emacs file
If you happen to maintain a personal diary, you must be paranoid about it’s secrecy. Emacs could be used to store your personal information. It uses
GNU GPG to save the file. Open any file in emacs with
gpg extension.To save it, press
C-s which asks for which type of encryption method to use. Just use the default and press OK. This would prompt for a passphrase for saving.
First install mplayer.
In Linux (Ubuntu/Debian) try
$ sudo apt-get install mplayer
In Mac try
$ brew install mplayer
$ git clone git://git.sv.gnu.org/emms.git
If it fails try this
$ git clone git://git.sv.gnu.org/r/emms.git
It will clone the folder emms. Inside the folder, there are
*el file inside
lisp. Copy them all to
~/.emacs.d/site-lisp/emms. Find the executable of
mplayer which is usually in
/usr/local/bin/. Then add this to your
M-x emms-play-directory to navigate to music directory and play files.
If you cling for user experience, it’s better to use regular browsers for social networking. And it sometimes becomes difficult to replicate all functionality of websites in emacs. Nevertheless, there’s a ways to circumvent some of the limitations and use social networking in emacs.
To use facebook, visit
http://m.facebook.com. If you want login information to remain store, add cookie information in emacs.
To use twitter, download
twittering-mode.el and store it somewhere. Add this to your
Last but not least, emacs also has lots of interesting features for amusement.
M-x doctorto talk to a psychologist.
M-x tetristo play tetris.
M-x snaketo play classic snake game.
M-x pongto play ping pong.
M-x mpuzfor multiplication puzzle.
M-x hanoifor computer solving towers of hanoi game
M-x gomokufor five-in-a-row against the computer 8.Type
M-x dunnetfor text based adventure game.
M-x lifeto grow your own cell in emacs.
M-x butterflyif you’re a xkcd fan.
For more visit emac’s games.
Emacs is not meant to be an all-in-one substitute for all softwares. Of course certain softwares are better at doing specific tasks. Emacs wins over the fact that I rarely needs to close it. One can easily customize and extend emacs using elisp, a dialect of lisp. If you’re convinced of the power of emacs, let me welcome you to the Church of Emacs. If not, let’s part ways with an old joke, “The Emacs operaating system needs a better editor”.