emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Neil Smithline <emacs-orgmode@neilsmithline.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [New Contrib Feature] Automatic URL shortening via Bitly
Date: Thu, 24 May 2012 22:14:47 -0400	[thread overview]
Message-ID: <4FBEEB17.1060309@neilsmithline.com> (raw)

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.

             reply	other threads:[~2012-05-25  2:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25  2:14 Neil Smithline [this message]
2012-05-25 21:36 ` [New Contrib Feature] Automatic URL shortening via Bitly Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBEEB17.1060309@neilsmithline.com \
    --to=emacs-orgmode@neilsmithline.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).