Sunday 23 November 2008

Blog Friendly Unit Shifter

a thing of rare beauty

Monochrome screenshot from the wget mailing list featuring Emacs and Supercite circa 1997.

in praise of Emacs

Been using Emacs for years but still learning
M-x sort-lines
M-x delete-trailing-whitespace
I knew about the first command but not the second. Very handy to tidy up an ugly SQL*Plus spool file.

Unix for lazy people

I am a very efficient lazy person. I don't like to type seven characters when two will suffice. I think Unix is a fantastic development environment. However, the overly long, verbose commands irritate me slightly. So I use the following aliases and shell functions

a = tail -f ${ORACLE_HOME}/rdbms/log/alert_PRD.log
l = ls
ll = ls -l
up = cd ..
x = rm -fr *
z = wall 'Anyone fancy a quickie after work ?' [disciplinary action pending]

One of the happiest days of my life was when I discovered the tab completion feature in the GNU bash shell and the environment variable $OLDPWD.

When I used to work for Sequent (with an operating system called Dynix/ptx devoid of applications), I used to carry the GNU tools and utilities around on a cartridge tape. Unix and GNU tools were brilliant but the best development tool is Emacs.

The second happiest day of my life was when I discovered Emacs' dynamic abbreviation feature. If you had had to suffer the pain of typing 'supercalifragilisticexpialidoceous' once, then subsequently, you could just type 'sup' following by ESC-/ and Emacs automatically, magically completed the word. This was without doubt the best feature in Emacs. Well apart from Gnus, VM, font-lock, C-mode, dired, support for shell, grep and cc. Oh and apart from being able to edit text files.

Emacs as a Web 2.0 application

When I started this blog, I simply composed the posts in the Blogger editor which was adequate. Until one day, when I lost the complete text of a draft posting due to finger trouble. As I laboriously re-typed my masterpiece, I wished I had a blog editor with the infinite undo, auto-save and all the other features of Emacs. However, composing the drafts in the Blogger editor was useful as I could edit drafts from anywhere and then publish the blog very easily. I then looked at Writely and Writeboard which fit the bill but are really intended for collaborative writing on the Web and don't have any integration with Blogger. The Qumana Blog Editor also looked very interesting as it includes integration with Blogger and built-in support for Technorati tags but still was essentially a cut-down Word lookalike interface. Then I realised I had the perfect blogging editor sitting right under my nose all the time - Emacs. I can use all of Emacs powerful text editting features and simply save the draft text on my Web server using ange-ftp. Adding Technorati tags is easy using Marshall Kirkpatrick's BlogTags bookmarklet. The only thing Emacs is missing is the ability to seamlessly publish to Blogger and another minor irritation is the fact that some whitespace gets jumbled when pasting the text into Blogger. However, Emacs being Emacs, some kind person has created a Lisp package (weblogger.el) that provides integration with Blogger although I haven't actually tried it yet. And please don't ask why I don't use the Blogger for Word extension. I can simply think of nothing worse. I wouldn't wish it on my worst enemies.
Page:  1