all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Martín" <mardani29@yahoo.es>
To: help-gnu-emacs@gnu.org
Subject: Re: emacsformacos: cannot access mac folders: Documents/Downloads
Date: Sat, 27 Mar 2021 13:20:39 +0100	[thread overview]
Message-ID: <m1mtuoeqjs.fsf@yahoo.es> (raw)
In-Reply-To: <874kgxrrxc.fsf@mat.ucm.es> (Uwe Brauer's message of "Sat, 27 Mar 2021 08:12:31 +0100")

Uwe Brauer <oub@mat.ucm.es> writes:

>
> Not sure, if you compile from master then this problem does not occur it
> seems to be more of a emacsformacosx thing

Because of the way this protection feature works and the different ways
you can build and run an Emacs binary for macOS, the casuistic is a bit
complex.  I'll try to summarize it:

If you compile Emacs from the GNU repository on a macOS system, you have
two ways to run the program:

a) You can run "make" and then execute "src/emacs".  In this case, Emacs
will inherit the privacy permissions of your terminal.  If your terminal
does not already have permission to access personal folders, the first
time you visit something in a personal folder from Emacs you will see a
prompt "<Your terminal> would like to access files in your <Personal
folder> folder".

b) Alternatively, you can run "make install" and then double click on
the "nextstep/Emacs.app" bundle, or move it to a more permanent
directory, like /Applications.  This is already the recommended way for
developers to run the NS native port of Emacs, and the procedure is
described in detail in "nextstep/INSTALL" from the Emacs repository.
The first time Emacs needs to visit something in a personal folder it
will prompt you in a similar way as a), but in the prompt it will show
as "Emacs" making the request and not your terminal program, provided
that you executed Emacs from the graphical user interface (for example,
from Launchpad).

If you prefer to use the version packaged from emacsformacosx.org, or
similarly you installed Emacs using a popular package manager like
Homebrew, there's a crucial difference: Emacs.app/Contents/MacOS/Emacs
is *not* a binary, but a Ruby script.  Why do the packagers use a custom
launcher written in Ruby?  It's a convenience for users so that a single
download can contain Emacs binaries for all supported macOS versions.
The Ruby launcher is maintained separately at
https://github.com/caldwell/build-emacs

This extra Ruby launcher is a nuisance for granting access to personal
folders, because a prompt won't appear and you'll need to grant full
disk access to "/usr/bin/ruby" manually.  There is an open bug report in
the "build-emacs" project to improve this:
https://github.com/caldwell/build-emacs/issues/94

I'm happy to contribute this explanation to the Emacs manuals if you
want (perhaps to the FAQ?), so that users can understand why they can't
access their personal folders in Emacs without resorting to do an online
search which in most cases do not offer the full explanation.



  parent reply	other threads:[~2021-03-27 12:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 22:03 emacsformacos: cannot access mac folders: Documents/Downloads Uwe Brauer
2021-03-26 22:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-27  2:25 ` Daniel Martín
2021-03-27  6:34   ` Eli Zaretskii
2021-03-27  7:12     ` Uwe Brauer
2021-03-27  9:19       ` Pankaj Jangid
2021-03-27 12:20       ` Daniel Martín [this message]
2021-03-27 16:23         ` Uwe Brauer
2021-05-02 16:09         ` Uwe Brauer
2021-03-27  7:24   ` Uwe Brauer
2021-03-27 12:22     ` Daniel Martín

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=m1mtuoeqjs.fsf@yahoo.es \
    --to=mardani29@yahoo.es \
    --cc=help-gnu-emacs@gnu.org \
    /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.