GNU bug report logs -
#32888
27.0.50; Cannot access other apps via applescript on Mojave
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Sun, 30 Sep 2018 18:09:01 UTC
Severity: normal
Found in version 27.0.50
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 6 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.