From 05982f42efbc27df5db10a6b244ab5dccdd31987 Mon Sep 17 00:00:00 2001
From: Daniil Frumin <difrumin@gmail.com>
Date: Mon, 13 May 2013 22:36:50 +0400
Subject: [PATCH 2/3] Fixing a bug in as-mac-firefox-get-frontmost-url

Prior to the fix the firefox link grabber won't work correctly if a cursor has been already positioned in the URL field. The fix works by adding an additional keystore for selecting all the text in that field.
---
 contrib/lisp/org-mac-link-grabber.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-mac-link-grabber.el b/contrib/lisp/org-mac-link-grabber.el
index e71fc15..f816c76 100644
--- a/contrib/lisp/org-mac-link-grabber.el
+++ b/contrib/lisp/org-mac-link-grabber.el
@@ -216,8 +216,9 @@ applications and inserting them in org documents"
 					 "	activate\n"
 					 "	delay 0.15\n"
 					 "	tell application \"System Events\"\n"
-					 "		keystroke \"l\" using command down\n"
-					 "		keystroke \"c\" using command down\n"
+					 "		keystroke \"l\" using {command down}\n"
+					 "		keystroke \"a\" using {command down}\n"
+					 "		keystroke \"c\" using {command down}\n"
 					 "	end tell\n"
 					 "	delay 0.15\n"
 					 "	set theUrl to the clipboard\n"
-- 
1.7.12.4 (Apple Git-37)

