From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.help Subject: Re: emacsformacos: cannot access mac folders: Documents/Downloads Date: Sat, 27 Mar 2021 13:20:39 +0100 Message-ID: References: <87a6qpshcn.fsf@mat.ucm.es> <834kgxp0jl.fsf@gnu.org> <874kgxrrxc.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3071"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 27 13:21:37 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQ7wf-0000h3-Hn for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 13:21:37 +0100 Original-Received: from localhost ([::1]:48540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQ7we-0000G0-JI for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 08:21:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ7w2-0000FP-MR for help-gnu-emacs@gnu.org; Sat, 27 Mar 2021 08:20:59 -0400 Original-Received: from sonic304-22.consmr.mail.ir2.yahoo.com ([77.238.179.147]:35036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQ7vt-0006V6-Ug for help-gnu-emacs@gnu.org; Sat, 27 Mar 2021 08:20:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1616847645; bh=xzQNyYX6wX0O0UT1U9bEd7a8/cxGPy7yuWzxGhrOOas=; h=From:To:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=NQ0n4EkQtuY9FfeYnZ0AYSt05NtH6mbqrvmucbts/eLOH55+e1ubKu/M48ciWqutN1VlfwUfmXXyR4sibgkndomV+/V1YyahbjLTzTvv3TK33TFXRZ1d0AN5j2E8IFwv5KHAVwX2dClTwZEpulXxPl/1aJsC3XbQWEwu7ddv7wMY3wt+yAG365gpZyRGp1c+y/RASP5dBoFNGltTwEeFgpthb3DORoa0LwCNMgJGQgkTTfoWuHW5oY2RRqEmms96jfXxY5cWrvVoHquwHl4zcvNJRMN6dCXJM0qHC5IdFH6UH0phvfgoHsI+Enrwb653LHN1k+8uQva9swgEY7Gu4A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1616847645; bh=MYnO4bpLL2AHnIE5DX1LQpcSPKdzGfP53uROUZJZJSQ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Ro3fDBvEVeW1SSnlH/ubKrvSLTK2+JBVvvc7Fp8rKuB9tXjXPAtQq6ABWA+Pbz6QNrRb236rpM6yVBebc0YyATdsxDYI6UcrZmnxb2rQmwSZDGn6i3wc5Ye/jNTQiNcYmzdXCIdmLyGEkDo1Laj0gys7PhDDCgr4jGXFIYZl/Li9iVduHoAv3WiZu1l5McCS5Msr/DpSxLQCHZnAIY68PdrULXALdmYKBI2CfeM7ByT1PqLbpot7O9H82z+glUVC6WrdsLNPz1NZoUtuNkd4i/HoSmPsDgwaGZmKqDAMfPoWjOzrquTZnRV2cag3dJn3zvGOr6m9f/Y2eiwqiBgCfA== X-YMail-OSG: CwP_.4sVM1ksmjP7pLe26g1yimMkRSQiviFWzoM5qqZm7v1T66QZUYr6KWEsgsB mHyGVfkrUmJEu9CjqBagT8AHI4WNCdWvobx1w1c5V1gn6tgPb3Q1zvHk.MMLczFtnmUA2_OPg1rJ QEQUwZbMM3f1vv5VRUb3n7UhEf2.e4MUHI1t0WtqBhj5YlcyEYEETW4BaOaeG7jXmM5wZhxG7bEj YM.aw6oJG8mpQF6UwyGNvCSDKIAowyD20mQGoyUzSHAHnClbT5ssv4hFQZG59jY7LPpVF4BN_RZK 0u3wpne6Geb5qWVepvXNHpBWvKbJ5f661WJCWNecpRLQblhIp6pHZ5SYfLX0K9hkhkUJDa.NTItU Etg8ybA3nf3l7ey7ZCRcpE.zh2i_Vr6v6eItRSMDZutLgpoGBQzcDl9hHkeCyFcLqtPmwGax7JJ_ n4E5O.9YCm0RL47xSECqjFDCNZYAxms_CdQtbkhG53KMysuIGfSQrKTSh.g0bwy7PhjrSX7p1b21 YK4zp4idan.VQR4vbCqCI1VPpYy_XmJuoanlwGyIUGvbRa6i9iH7K88dTn.DXhW3shRctCWk6Wxm JI4RPABjhAvqgMsh5ZjjcUgEXWrqkK5wGyYPKnsO1tWxzfBym.Vr5eGh4PoV_b0dLlVPDftE6jQF NP8iFrFUj7.F4zHvoafH0HWR9.tLx2MS2UJ.ZaIWOSc2S_j.CdE3s8_Q3qkzMROlQhI6CGFWQnH5 211T6_aS_g0VIIKHY8SRBxcasB1BLg_XoovFhCSN6CjlbuJ7bU5uvQM89XYAf.vEjSgADQrqnkO6 fkAHokjJUWS98TuD3iz.9Tj8eKsT2hlDnD9SBoJfFo X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Sat, 27 Mar 2021 12:20:45 +0000 Original-Received: by kubenode544.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a6b76213441ac97f3d8830bc6e790e6e; Sat, 27 Mar 2021 12:20:42 +0000 (UTC) In-Reply-To: <874kgxrrxc.fsf@mat.ucm.es> (Uwe Brauer's message of "Sat, 27 Mar 2021 08:12:31 +0100") X-Mailer: WebService/1.1.17936 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.9.1) Received-SPF: pass client-ip=77.238.179.147; envelope-from=mardani29@yahoo.es; helo=sonic304-22.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128707 Archived-At: Uwe Brauer 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 " would like to access files in your 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.