-
Notifications
You must be signed in to change notification settings - Fork 62
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
Can not do dired on ~/Documents when it is in iCloud on Catalina #84
Comments
I somehow got it working. Add Emacs.app to "Full Disk Access", then inside Emacs, use |
To help clarify (based upon my experiments -- please verify) There seems to be three of these: The Thank you @XeCycle |
Add up to that reboot note: it started failing again after a macOS upgrade. Repeat the same steps and it's fixed again. |
FWIW, the Internet (well, StackExchange) seems to think this issue is related to the launcher script being written in Ruby, yet "Full Disk Access" is granted only to Emacs (and not to Ruby): I tend to agree. I did a quick test with my Emacs install where I moved the launcher script out of the way and symlinked the appropriate binary in its place, and everything worked fine. I did not need to do
Just to be safe (and to verify this is actually the problem), I did the following:
So this definitely seems to be tied to the launcher script. |
Are these changes in the repository now? I tried to build a fresh and the output is without the ruby script. And it is working great. |
Oh! I took directly from Emacs.app and not the .dmg output from |
Which kinda confirms that its the start up script. Just to let this side of the world know -- I updated to 10.15.1 and did not hit any problems. Go figure. |
On a 10.15.1 fresh install I got the problem and had to give full disk access and do the |
I installed emacs for the first time, and I hit this issue within 15 minutes of experimenting. Can this be fixed from install? |
My issue was, I had this custom dired setting, had to comment it out dired-listing-switches "-AlBGh --group-directories-first" As mentioned here. |
For Emacs installations running on ARM-based processors (M1s), run the following commands for optimal performance on |
@dcguim What is optimal about that? |
Please correct if I am wrong @caldwell, but if the Emacs binary built for x86 processor is ran on an ARM-based processor it will be first converted into a universal binary through apple's Roseta, whereas the Emacs-arm-* binaries run natively on ARM-based processors. I believe arm processors can execute instructions, on average, faster for arm binary than for universal binaries, quoting the developer.apple website; (universal binaries) "... is not a substitute for creating a native version of your app." and "The system prefers to execute an app’s arm64 instructions on Apple silicon." |
The main
The ruby launcher script figures out which OS+architecture the machine is and
That tells me the correct native architecture is running. I can also verify it in Activity Monitor by searching for "Emacs" and adding the "Architecture" column (right clicking the table header). That shows me it being set to "Apple" which means it's running M1 native. Renaming away the Ruby script will of course work, but it shouldn't change any outcomes (and if it does, then there's a bug that should be fixed). |
I recently replaced the loader-script used by http://emacsformacosx.com/ with a symlink to the actual Emacs.app binary. This was done to solve an issue with permissions on macOS (caldwell/build-emacs#84), but this also exposed an issue with $PATH handling (caldwell/build-emacs#39). I don't want Ruby scripts to have unrestricted filesystem access, nor do I want userland folders to be inaccessible via dired. To workaround both issues, Emacs.app now spawns a shell at startup in order to reread $PATH (and $MANPATH) so that commands in ~/.files/bin` or wherever are visible to a graphical Emacs session.
That appears to be the case. I followed @josh-berry's instructions above and now I can dired |
Can someone who has this issue try the nightly build from 2022-04-05. I believe it can help in this case but I don't use iCloud for |
On macOS 12.3.1 on a MBP with the M1 Max chip: Opening ~/Documents works without any hiccups of oddities. Opening ~/Desktop the very first time pops up a dialog box (which I didn't capture) that the user can click Ok or something positive and it disappears and will not be seen again even after restarting Emacs. The same is true for ~/Downloads -- it pops up once. I use |
emacs-version returns:
^X ^F /~/Documents
results in:This is on Catalina with my Documents (and Desktop) in iCloud. From an outside Terminal, you see:
I've tried a few things but have not been able to resolve this yet. This was originally reported on the Emacs help mailing list.
I've tried adding Emacs to the "Full Disk Access" list as well as "Developer Tools" in System Preferences => Security & Privacy => Privacy
I've discovered that Emacs.app and all of its files and directories have the
com.apple.quarantine
attribute so I've removed that.And, as we probably all know, this version starts up a ruby shell and then does an exec. I've tried changing that to "command" so that the parent process that the Finder starts is a direct ancestor of the "ls" command that Emacs eventually does.
I've also tried to horse around in the
Terminal.app
starting sub shell, irb, etc trying to recreate it outside of Emacs and have not been able to.The text was updated successfully, but these errors were encountered: