2010 in review

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health: The Blog-Health-o-Meter™ reads Wow. Crunchy numbers A Boeing 747-400 passenger jet can hold 416 passengers. This blog was viewed about 7,800 times in 2010. That’s about 19 full 747s. In 2010, there were 9 new posts, growing the total archive of this blog to 33 posts. There were 14 pictures uploaded, taking up a total of 941kb. That’s about a picture per month. ...

January 2, 2011 · 2 min

Three nifty alternatives to the M-TAB key in Emacs, and a replacement.

The M-<TAB> key in Emacs provides a useful completion function (`completion-at-point’), which tries to complete the current symbol at point to something useful, usually based on other symbols in the buffer which have the current partial symbol as a prefix. However, using this key is a pain in most OS GUI systems, since it is usually mapped to the Task Switching function as well. Note that the <Alt> key doubles as <Meta> on most keyboards. ...

September 29, 2010 · 2 min

How I Learned to stop using Firefox and love the Chrome

One word: SPEED. Seriously. I have been a long proponent and user of Firefox, having been lured into it by its relative elegance and the extension framework many moons back. Also, the web development support has always been far better than its competition, with Firebug and Web Developer to name just two great reasons for it being the developer’s browser of choice. The sheer number of Firefox add-ons and extensions (about 13,000 in the last count) is staggering - and list absolute essentials such as Adblock Plus, XMarks and DownThemAll! This combined with the themes (I suggest GrApple Yummy on the Mac) has been making the web browsing experience a far better one for me than Safari. ...

June 10, 2010 · 4 min

Emacs 23.2 has been released.

Emacs 23.2 has been released. The source downloads are available at: ftp.gnu.org/gnu/emacs/ For those who prefer access to the VCS, the read-only bzr URL is: http://bzr.savannah.gnu.org/r/emacs/emacs-23. Enjoy!

May 9, 2010 · 1 min

Converting from TaskPaper to Emacs Org-Mode

Why TaskPaper and Org-Mode? TaskPaper is a simple and elegant task management software for the OSX platform. It combines the simplicity of a text micro-format to mark the tasks, and the elegance of a Mac UI. It also provides a quick launch time and a nice system-wide quick entry window that is accessible with a single shortcut key. I have been a heavy user of Emacs’ Org-Mode for some years now, and love the power and flexibility it offers for tracking not just outlines and tasks, but any text based item, including notes and calendar entries. In fact Org-Mode has become one of the primary software that I use regularly, every day. ...

March 30, 2010 · 5 min

Firefox 3.6 finally allows true Fullscreen mode on Mac OSX

Updated to Firefox 3.6 today. As usual, a very solid update, and was pleasantly surprised by the full-screen mode (finally!) that works exactly as you would want it. This was one of the few areas where Firefox on OSX was lagging behind as compared to other platforms. There were a few plugins that claimed to enable this in prior versions, but never worked very well. The option is available under the “View”menu and has a standard Apple-Shift-F shortcut as well. ...

January 26, 2010 · 1 min

Emacs function to add new path elements to the $PATH environment variable

A very simple eLisp function to add new path elements to the PATH environment variable. Very useful for adding new comint executables from within .emacs/init.el files. (defun my-add-path (path-element) "Add the specified path element to the Emacs PATH" (interactive "DEnter directory to be added to path: ") (if (file-directory-p path-element) (setenv "PATH" (concat (expand-file-name path-element) path-separator (getenv "PATH")))))

January 20, 2010 · 1 min

Google Search from within Emacs

A quick and dirty eLisp function for searching on the internet from within Emacs. The default is to search using Google, but you can add to the *internet-search-urls* variable to setup additional search URLs. By default, the search term is appended at end of the URL - however, you can also encode the specific search term insertion point in the URL by marking the position using the “%s” marker. ;;; The custom search URLs (defvar *internet-search-urls* (quote ("http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" "http://en.wikipedia.org/wiki/Special:Search?search="))) ;;; Search a query on the Internet using the selected URL. (defun search-in-internet (arg) "Searches the internet using the ARGth custom URL for the marked text. If a region is not selected, prompts for the string to search on. The prefix number ARG indicates the Search URL to use. By default the search URL at position 1 will be used." (interactive "p") ;; Some sanity check. (if (> arg (length *internet-search-urls*)) (error "There is no search URL defined at position %s" arg)) (let ((query ; Set the search query first. (if (region-active-p) (buffer-substring (region-beginning) (region-end)) (read-from-minibuffer "Search for: "))) ;; Now get the Base URL to use for the search (baseurl (nth (1- arg) *internet-search-urls*))) ;; Add the query parameter (let ((url (if (string-match "%s" baseurl) ;; If the base URL has a %s embedded, then replace it (replace-match query t t baseurl) ;; Else just append the query string at end of the URL (concat baseurl query)))) (message "Searching for %s at %s" query url) ;; Now browse the URL (browse-url url))))

January 19, 2010 · 2 min

Quickly diff the changes made in the current buffer with its file

Update (23rd Jan 2010): Separated the key-assignment and function definition. A simple function to quickly do a diff of the current buffer contents with its underlying file. Very useful if the file has been changed outside (e.g., a log file). ;; Diff the current buffer with the file contents (defun my-diff-current-buffer-with-disk () "Compare the current buffer with it's disk file." (interactive) (diff-buffer-with-file (current-buffer))) (global-set-key (kbd "C-c w") 'my-diff-current-buffer-with-disk)

January 19, 2010 · 1 min

gnuplot with AquaTerm on OSX Snow Leopard

The gnuplot graphing utility has always had excellent support for multiple terminal types. While the X11 terminal is a satisfactory GUI view for the graphs, I prefer to use the AquaTerm terminal on OSX as it is more ‘Mac-like’ and feels more natural. Also, I do prefer to compile gnuplot by myself on OSX rather than downloading the pre-packaged binaries - as this gives me more control over the compilation (including getting around the stupid Apple readline bug - where Apple has essentially shipped a broken readline by using libedit to emulate the non-existent libreadline). ...

January 17, 2010 · 3 min