Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ae7d856b2e
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 53 lines (37 sloc) 1.807 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
(*
org-link.scpt --- extract an org-protocol links from all open tabs in the front Safari window

Copyright (C) 2009, 2010 Christopher Suckling

Author: Christopher Suckling <suckling at gmail dot com>

This file is Free Software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

It is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.

Vesion: 0.634

Commentary

Part of org-mac-protocol

Installation

1) Open in AppleScript Editor
2) Save as File Format: Script in ~/Library/Scripts/

Please see org-mac-protocol.org for full installation and usage instructions
*)

set ASTID to AppleScript's text item delimiters
set text item delimiters to {":"}
set myPath to (path to me) as text
set orgQSLib to (text items 1 through -2 of myPath) & "orgQSLib:" as text
set AppleScript's text item delimiters to ASTID

set getEmacsLib to (load script file ((orgQSLib as text) & "getEmacsClient.scpt"))
set getItemMetaLib to (load script file ((orgQSLib as text) & "getItemMetadata.scpt"))
global escapeLib
set escapeLib to ((orgQSLib as text) & "escape.rb")
set theProtocol to "org-protocol:/safari-tabs:/"

set theApp to "Safari-Tabs"

set theScript to getEmacsLib's getEmacsClient() & " " & getItemMetaLib's getItemMetadata(theProtocol, theApp)

do shell script of theScript
Something went wrong with that request. Please try again.