From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Smithline Subject: [New Contrib Feature] Automatic URL shortening via Bitly Date: Thu, 24 May 2012 22:14:47 -0400 Message-ID: <4FBEEB17.1060309@neilsmithline.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXk3L-00080d-CM for emacs-orgmode@gnu.org; Thu, 24 May 2012 22:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXk3J-0000SO-9d for emacs-orgmode@gnu.org; Thu, 24 May 2012 22:14:54 -0400 Received: from mail-qc0-f169.google.com ([209.85.216.169]:54024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXk3J-0000SE-5C for emacs-orgmode@gnu.org; Thu, 24 May 2012 22:14:53 -0400 Received: by qcsd16 with SMTP id d16so366978qcs.0 for ; Thu, 24 May 2012 19:14:50 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Just thought I'd let you know about two projects I've been working on that, when combined, make Org even cooler than it already is. A few months ago I took over maintenance of Emacs' bitly.el. I really worked it over, fixed some bugs, and, most importantly, I made it default to doing an asynchronous call to Bitly. Now you just ask it to shorten an URL and, sometime in the near future, it will. I just recently wrote org-auto-shorten-url. It binds to the `]' key in Org Mode. When you type `]', it does some sanity checks to see if you just finished typing a link. If you have, it calls `bitly-shorten-url' in the background to shorten the URL. The net net of this is that as you are typing an URL in Org Mode: [[http://example.com][Example]] The http://example.com will magically be transformed into a Bitly URL. I now use this for all of my HTML links. Due to technical complications, inline image links don't work and probably never will. You can grab the two packages from Github. They have a dependency on my `defhook' package though you can convert that to a straight `add-hook' call if you don't want to use defhook (though I think it is real cool). Neil - https://github.com/Neil-Smithline/bitly.el - https://github.com/Neil-Smithline/org-auto-shorten-url - https://github.com/Neil-Smithline/defhook -- Neil Smithline http://www.neilsmithline.com Proud GNU Emacs user since 1986, v. 18.24.