org-mac-link.el – Grab links from open Mac applications

Table of Contents

{Back to Worg's contibutions index}

Overview

This code will allow you to grab the current link or selection from an open mac application and insert it as a hyperlink at point in an org-mode document.

Supported Applications

The following applications are currently supported:

  • Finder.app
  • Mail.app
  • Address Book.app
  • Safari.app
  • Skim.app
  • Firefox.app
  • Firefox.app with the Vimperator plugin
  • Google Chrome.app
  • Together.app

Installation

Customize the org group by typing M-x customize-group RET org RET, then expand the Modules section, and enable mac-link.

You may also optionally bind a key to activate the link grabber menu, like this:

(add-hook 'org-mode-hook (lambda () 
  (define-key org-mode-map (kbd "C-c g") 'org-mac-grab-link)))

Usage

Activate the grabber by typing C-c g (or whatever key you decided to bind, as above), or type M-x org-mac-grab-link RET. This will give you a menu in the modeline allowing you to select an application. The current selection in that application will be inserted at point as a hyperlink in your org-mode document.

Customizing

You may customize which applications appear in the grab menu by customizing the group org-mac-link. Changes take effect immediately. If you are using the org-mode version >=8.2, you can also customize whether the org-mac-link should highlight the selected text when grabbing the link from Skim.app.

Documentation from the http://orgmode.org/worg/ website (either in its HTML format or in its Org format) is licensed under the GNU Free Documentation License version 1.3 or later. The code examples and css stylesheets are licensed under the GNU General Public License v3 or later.