Building A Bookmark Launcher

Álvaro Ramírez has a very nice post on Building your own bookmark launcher. The idea is that you have certain Web sites that you visit all the time and you’d like a quick way of opening them in your browser.

This isn’t too hard to do at small scale. I use the Bookmark+ package to launch a couple of frequently used Web sites, such as Irreal, directly from Emacs using abo-abo’s headlong-bookmark-jump to enable single letter targets. That’s great and I use it many times a day but there are a couple of problems:

  1. It doesn’t scale very well to more than a few bookmarks
  2. It only works from inside Emacs

The first problem doesn’t matter too much to me because I don’t have many Websites I need to call from within Emacs. The second (and even the first) problem is solved by the wonderful Alfred framework that I’ve written about before. I simply invoke Alfred with a hotkey, type in a letter or two of the target, and BAM! I’m taken to that site in my browser.

Ramírez’s solution solves both of the above problems in a unified way. It’s pretty straightforward, but interesting, when used from within Emacs: You get the usual completing read list of targets that allows you to fuzzy search for the desired site.

When not in Emacs, it makes a command line call to Emacs asking it to invoke the bookmark code. The clever part is that Ramírez sets up a custom frame for the interface. He also uses Hammerspoon to map a shortcut for his call to Emacs.

It’s a nice solution and worth studying even if you don’t need a way to launch bookmarks to Web sites. There’s plenty of good ideas and techniques so be sure to take a look.

This entry was posted in General and tagged , . Bookmark the permalink.