Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not authorised to send Apple events ... Mojave issue #1

Closed
anbanpillay opened this issue Sep 27, 2018 · 4 comments
Closed

Not authorised to send Apple events ... Mojave issue #1

anbanpillay opened this issue Sep 27, 2018 · 4 comments

Comments

@anbanpillay
Copy link

In the Mojave, cannot grab link. Error is "Not authorised to send Apple events to ...". Is there a workaround?

@xuchunyang
Copy link
Owner

I don't know. I haven't upgraded. I guess maybe Emacs's do-applescript simply doesn't work on Mojave, if it's true, this is probably an Emacs issue.

@xuchunyang
Copy link
Owner

I have upgraded to macOS Mojave and the error message I get is

AppleScript error 1

Below is the version of my Emacs

(emacs-version)
;; =>
"GNU Emacs 27.0.50 (build 11, x86_64-apple-darwin18.0.0, NS appkit-1671.00 Version 10.14 (Build 18A391))
 of 2018-10-23"

Anyway, this is probably a bug of Emacs. According to https://www.felix-schwarz.org/blog/2018/06/apple-event-sandboxing-in-macos-mojave

apps can no longer send Apple Events to other apps without user authorization.

Emacs now has to ask user for authorization, like Terminal.app

screen shot 2018-10-28 at 5 19 54 am

@xuchunyang
Copy link
Owner

I just learnt the fix and it works here. Add the following to Emacs's Info.plist and restart Emacs.

<key>NSAppleEventsUsageDescription</key>
<string>Emacs requires permission to send some event to another application.</string>

The path to Info.plist for me is

(expand-file-name "../Info.plist" invocation-directory)
;; => "/Users/xcy/src/emacs/nextstep/Emacs.app/Contents/Info.plist"

For more info, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32888#8

@anbanpillay
Copy link
Author

Great. Thanks for your assistance.
Upgrading my emacs through brew to HEAD-c9487b2 seems to have fixed the issue. grab-link works now - a dialog pops up asking for permission and then all is well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants