On 21 Jun 2014, at 22:34, Haider Rizvi <harizvi@gmail.com> wrote:

Daniel Franke <daniel@dfranke.com> 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



Good evening Haider.

thank you so much for your input, this helps a lot!! :) Now i have a working solution.

I used the script you suggest with a small change :

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"
tell application "System Events"
keystroke "v" using {command down}
keystroke return
end tell
activate application "Safari"

and then I opened it with the application Fastscripts (http://www.red-sweater.com/fastscripts/). No i have the option to add the bookmark by keystroke  to the 
actual open Emacs window.

Regards,
Daniel!