From: Daniel Franke <daniel@dfranke.com>
To: Haider Rizvi <harizvi@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Get links from Firefox/Safari into orgmode
Date: Sun, 22 Jun 2014 02:12:18 +0200 [thread overview]
Message-ID: <28E09BEF-DE24-40DA-B63D-A8DDBADA0C4D@dfranke.com> (raw)
In-Reply-To: <m1egyi2e9f.fsf@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1770 bytes --]
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!
[-- Attachment #1.2: Type: text/html, Size: 6360 bytes --]
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 1516 bytes --]
next prev parent reply other threads:[~2014-06-22 0:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 17:43 Get links from Firefox/Safari into orgmode Daniel Franke
2014-06-20 18:05 ` Haider Rizvi
2014-06-20 18:55 ` Daniel Franke
2014-06-21 20:34 ` Haider Rizvi
2014-06-22 0:12 ` Daniel Franke [this message]
2014-06-22 21:57 ` Uwe Koloska
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28E09BEF-DE24-40DA-B63D-A8DDBADA0C4D@dfranke.com \
--to=daniel@dfranke.com \
--cc=emacs-orgmode@gnu.org \
--cc=harizvi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).