[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Get links from Firefox/Safari into orgmode
From: |
Haider Rizvi |
Subject: |
Re: [O] Get links from Firefox/Safari into orgmode |
Date: |
Sat, 21 Jun 2014 16:34:20 -0400 |
User-agent: |
Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (darwin) |
Daniel Franke <address@hidden> 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