From: Alan Third <alan@idiocy.org>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: 32888@debbugs.gnu.org
Subject: bug#32888: 27.0.50; Cannot access other apps via applescript on Mojave
Date: Sun, 30 Sep 2018 19:41:38 +0100 [thread overview]
Message-ID: <20180930184138.GB88954@breton.holly.idiocy.org> (raw)
In-Reply-To: <m21s9ac0zg.fsf@gmail.com>
On Sun, Sep 30, 2018 at 11:08:03AM -0700, Aaron Jensen wrote:
>
> Launch Chrome and open a webpage
>
> emacs -Q
>
> eval:
>
> (do-applescript
> (concat
> "set frontmostApplication to path to frontmost application\n"
> "tell application \"Google Chrome\"\n"
> " set theUrl to get URL of active tab of first window\n"
> " set theResult to (get theUrl) & \"::split::\" & (get name of window 1)\n"
> "end tell\n"
> "activate application (frontmostApplication as text)\n"
> "set links to {}\n"
> "copy theResult to the end of links\n"
> "return links as string\n"))
>
> I get "AppleScript error 1", but I'd expect to get the url and title of
> the page open in Chrome (try it in Script Editor).
>
> This code is from org-mode's org-mac-grab-link
>
> I'm guessing this has to do with the new permission sandbox stuff,
> though I don't know what Emacs needs to do to properly ask for permission.
Try adding this to the Info.plist:
<key>NSAppleEventsUsageDescription</key>
<string>Emacs requires permission to send some event to another application.</string>
I’ve no idea if it’s in the right format or anything...
--
Alan Third
next prev parent reply other threads:[~2018-09-30 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-30 18:08 bug#32888: 27.0.50; Cannot access other apps via applescript on Mojave Aaron Jensen
2018-09-30 18:17 ` Aaron Jensen
2018-09-30 18:43 ` Alan Third
2018-09-30 18:41 ` Alan Third [this message]
2018-09-30 19:59 ` Aaron Jensen
2018-10-11 1:42 ` Aaron Jensen
2018-10-11 6:59 ` Alan Third
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180930184138.GB88954@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=32888@debbugs.gnu.org \
--cc=aaronjensen@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.