Thank You, Bram Moolenaar.

Bram Moolenaar is no longer with us. The creator of Vim passed away last week at a relatively early age, leaving behind a rich legacy of the immensely popular modal text editor. He will be missed by millions of users and fans, who use it daily, and whose first interaction with any *nix system (at least on Linux and macOS) would have involved vim. I had written about my Vim experience a few years back. Since then, my toolkit has always included Vim (or rather, MacVim). While Emacs remains my primary tool, Vim has a geeky elegance, and its hyper-focus on editing performance is hugely attractive. Also, while Emacs is sometimes (and rightfully) called a kitchen sink, Vim is equally so, at least as the “can do everything” text editor. And it is the standard text editor, after all[1]. ...

August 9, 2023 · 1 min

The Other Emacsen

While Emacs remains my primary text editor, there are times when starting a full Emacs session with tons of packages is simply too slow, especially on a terminal window, and when the task at hand is simply to make a few lines of changes in a configuration file. Yes, I do know about the handy -q command-line option, which prevents the init.el file from being loaded, thereby ensuring a sub-second initialization of Emacs, or the emacsclient route (which I have enabled, and do use), but sometimes it is just more convenient to have a fast editor that has the Emacs feel, without the bloat. And for a text nerd such as myself, it is also a matter of curiosity to try out other editors once in a while. ...

November 30, 2014 · 3 min

What's New in Emacs 24.4

Mickey Petersen has written up an excellent round-up of the latest features of the Emacs 24.4 release. Read the whole article at http://www.masteringemacs.org/articles/2013/12/29/whats-new-in-emacs-24-4/. He had also written a similar article for Emacs 24.3 (current stable version), which can be found here. New Settings that I am using I have already setup the load-prefer-newer, cycle-spacing, and ns-use-srgb-colorspace options. The new electric-pair-mode options also look interesting, and I have set these up (I was using skeleton-pair for the auto-pairing function till now). ...

December 30, 2013 · 2 min

Copying the previous line to current position in Emacs

Recently, I came across a scenario where I had to quickly copy the previous line in an Emacs buffer to the current position. The usual method for doing this has been to invoke: C-p C-a C-k C-y RET C-y Which basically does the following: Moves to the previous line (C-p) Moves to the beginning of the previous line (C-a) Kills the line (i.e., cuts the line with C-k) Yanks the line back (i.e., restores the original line with C-y) Creates a newline (RET), and Yanks another copy of the line with the final C-y (which is what we wanted in the first place) While this works, it is certainly not the most optimal mechanism to perform such a simple (albeit infrequent) operation. ...

June 30, 2013 · 2 min

Heretical Confessions of an Emacs Addict - Joy of the Vim Text Editor

Context As an experiment, I have recently started using Vim as my primary text editor. While I have been an Emacs aficionado for a very, very long time - clocking in at almost 16 years - Vim is something that I have always been curious about, and tinkered with from time to time, while ending up going back to Emacs. This time however, I intend to stick around for a while, and try to get a feel of the Zen of Vim. ...

September 15, 2011 · 4 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

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

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