Homebrew-emacs-plus: "'Emacs' would like to control this computer using accessibility features"

Created on 25 Oct 2018  路  8Comments  路  Source: d12frosted/homebrew-emacs-plus

screen shot 2018-10-24 at 8 49 54 pm

I just got this dialog on MacOS Mojave (10.14) with Emacs 26.1 (9.0) installed with brew install emacs-plus yesterday. It happened after clicking in the menu bar, but instead of the menu opening, it displayed this dialog. I have seen it once before on a previous version a couple days prior (which prompted me to uninstall, update, and reinstall the current version).

I don't know how to reproduce it (clicking the menu bar doesn't always result in this).

I of course clicked deny. It's a little alarming and I was wondering if anyone else has seen this or knows what's happening.

question

Most helpful comment

Once I give permissions, all other menus are opening on hover as well.

BTW, I can reproduce this behaviour with other Emacs 'distributions' (e. g. building from sources on the master branch, a prebuilt app from emacsformacosx) without any custom configurations. There must be something about Emacs itself that asks for permissions.

All 8 comments

I have seen this also in various combinations (without interacting with the menu). Also Emacs requested access to contacts, calendars, photos, accessibility. I blamed so far Mojave, because these where present in High Sierra also. Emacs worked fine so far (beside some rendering issues which remain unsolved).

I have seen this also with other applications which where fixed by some update in the last days. Most notably Dropbox which requested accessibility features (for finder integration) which are (or at least have not been) needed for its operation. Two or three days ago this has been fixed by a dropbox update. I don't think that Emacs is requesting such features; Therefore I'm thinking of an OS bug. But maybe someone knows better.

screenshot 2018-10-26 at 00 00 27

screenshot 2018-10-26 at 00 02 49

Hi everyone,

These messages depend on your Emacs configurations. You are prompted once your code tries to do something that requires additional permissions/features. They changed this in Mojave and you can see many applications are now causing this kind of prompts to appear.

For example, if you open a multi-term(or something alike) in Emacs and run

osascript -e 'if application "iTunes" is running then tell application "iTunes" to if player state is playing then return true'

You will be prompted to allow Emacs.app to control iTunes.app. After I give permission to do it, I see Emacs under automation scope in System Preferences > Security & Privacy > Privacy.

Many things can require accessibility features, but it depends on your configurations.

Thanks,

in my case I never do such things (afaik). But I do also see this issue in various other Apps like Dropbox (stopped recently) and also in JetBrains products. Sometimes is happens in Emacs when I use the menu (by accident with the mouse, I nearly never use the menu).

I guess what you describe has (maybe) something todo with full disk access, which is new in Mojave. My configuration lives mainly in ~/.emacs.d/ and what ever file I access in ~/, ~/Code or other typical directories.

It may also play a role what kind of user you use on the system. In my case, I'm not in the admin group (or whatever it is called).

Also unrelated to Emacs: If I do rustup docs I get safari with my local rust documentation. If I restart the machine and say "Please reopen windows when logging back in", then sometimes Safari cannot open the local html file, which previously was opened just fine.

I'm not yet convinced that this has anything todo with Emacs.

I just received the accessibility request on a fresh install of emacs-plus with a fresh config of spacemacs, for what it's worth. I did the same thing, clicked somewhere on the top menu bar, and was immediately presented with the OS dialog box. I'm on MacOS 10.14.1.

Something minor but possibly related: I noticed that in other programs, you can open the drop menu on the program name (e.g. QuickTime Player) and then move your mouse over to the right on the other options (File, Edit, View...). All the respective menus will drop as your cursor moves over them.

This does not happen with Emacs Plus. When you move the cursor from Emacs to File, the menu will close. It might somehow be related to the accessibility dialog option coming up.

Once I give permissions, all other menus are opening on hover as well.

BTW, I can reproduce this behaviour with other Emacs 'distributions' (e. g. building from sources on the master branch, a prebuilt app from emacsformacosx) without any custom configurations. There must be something about Emacs itself that asks for permissions.

Related discussion: emacs menu items require clicking twice (accessibility permission fixes it)

@jassa That probably explains it:

  1. When you click on a menu, Emacs synthesizes a click (don't ask why, gory details in this message). The thread doesn't discuss hovering, but it's plausibly a related issue.
  2. In their words: > In MacOS Mojave, synthetic mouse events are blocked for security reasons, so this no longer works; the synthetic click is discarded and the menu doesn't open.

Thanks everyone for your responses and comments in this thread. Since it's stalled, I am going to close it. Feel free to continue discussion if you have anything to add 馃樃

Was this page helpful?
0 / 5 - 0 ratings