From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haider Rizvi Subject: Re: Get links from Firefox/Safari into orgmode Date: Sat, 21 Jun 2014 16:34:20 -0400 Message-ID: References: <36ECB38A-86A2-40CB-98A5-D7C3ABEA963D@dfranke.com> <77D73F63-E1D2-4FBA-9873-7989B028FC59@dfranke.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyRzi-0006zt-UM for emacs-orgmode@gnu.org; Sat, 21 Jun 2014 16:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyRzd-000339-J3 for emacs-orgmode@gnu.org; Sat, 21 Jun 2014 16:34:38 -0400 Received: from plane.gmane.org ([80.91.229.3]:41785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyRzd-00032x-Cp for emacs-orgmode@gnu.org; Sat, 21 Jun 2014 16:34:33 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WyRzb-0005fO-PT for emacs-orgmode@gnu.org; Sat, 21 Jun 2014 22:34:31 +0200 Received: from 135-23-130-76.cpe.pppoe.ca ([135.23.130.76]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Jun 2014 22:34:31 +0200 Received: from harizvi by 135-23-130-76.cpe.pppoe.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Jun 2014 22:34:31 +0200 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: emacs-orgmode@gnu.org Daniel Franke writes: > emacs => firefox/safari That's correct. > browser => emacs Probably the best is to use an Applescript like below, and save it in ~/Library/Scripts/Applications/Safari. You can kick off this Applescript using a variety of methods (Quicksilver, menu bar, etc.) http://www.tuaw.com/2006/08/08/tuaw-tip-enable-the-applescript-menu/ tell application "Safari" set theUrl to URL of document 1 set theName to the name of the document 1 set theOrglink to "[[" & theUrl & "][" & theName & "]]" set the clipboard to theOrglink end tell activate application "Emacs" -- this last bit is iffy, since Emacs will not always have an org file -- open in the frame that pops up. tell application "System Events" keystroke "y" using control down end tell Hope this helps. Regards, -- Haider