From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#42903: 28.0.50; Emacs doesn't start if the current directory is inaccessible Date: Mon, 17 Aug 2020 16:25:18 -0700 Organization: UCLA Computer Science Department Message-ID: <3166e8a5-d26f-30d5-859a-ff4c6afb6338@cs.ucla.edu> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------AB11FCCB3388ECA1D192A65F" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19738"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 42903-done@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 18 01:26:18 2020 Return-path: Envelope-to: geb-bug-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 1k7oWA-00051u-B6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Aug 2020 01:26:18 +0200 Original-Received: from localhost ([::1]:39498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7oW9-0007Vj-7G for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Aug 2020 19:26:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7oVv-0007VT-0b for bug-gnu-emacs@gnu.org; Mon, 17 Aug 2020 19:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7oVu-0004Az-N6 for bug-gnu-emacs@gnu.org; Mon, 17 Aug 2020 19:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k7oVu-00083f-KH for bug-gnu-emacs@gnu.org; Mon, 17 Aug 2020 19:26:02 -0400 In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Aug 2020 23:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 42903 X-GNU-PR-Package: emacs Mail-Followup-To: 42903@debbugs.gnu.org, eggert@cs.ucla.edu, p.stephani2@gmail.com Original-Received: via spool by 42903-done@debbugs.gnu.org id=D42903.159770672930927 (code D ref 42903); Mon, 17 Aug 2020 23:26:02 +0000 Original-Received: (at 42903-done) by debbugs.gnu.org; 17 Aug 2020 23:25:29 +0000 Original-Received: from localhost ([127.0.0.1]:33451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7oVM-00082l-O0 for submit@debbugs.gnu.org; Mon, 17 Aug 2020 19:25:28 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7oVJ-00082W-OB for 42903-done@debbugs.gnu.org; Mon, 17 Aug 2020 19:25:28 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 95CEE1600DA; Mon, 17 Aug 2020 16:25:19 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2S97sQgQoBag; Mon, 17 Aug 2020 16:25:18 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C98071600F3; Mon, 17 Aug 2020 16:25:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FcfOe48AMg3X; Mon, 17 Aug 2020 16:25:18 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A0FA71600DA; Mon, 17 Aug 2020 16:25:18 -0700 (PDT) Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoU Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185427 Archived-At: This is a multi-part message in MIME format. --------------AB11FCCB3388ECA1D192A65F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for reporting that. Since this is a regression from Emacs 26 to 27, I installed the attached into the emacs-27 branch. --------------AB11FCCB3388ECA1D192A65F Content-Type: text/x-patch; charset=UTF-8; name="0001-Let-Emacs-start-even-if-curdir-is-inaccessible.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Let-Emacs-start-even-if-curdir-is-inaccessible.patch" >From 362ca83a3b9d74c51ac325a6490551272aa25f9a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 17 Aug 2020 16:21:36 -0700 Subject: [PATCH] Let Emacs start even if curdir is inaccessible * lisp/startup.el (normal-top-level): Also delete PWD if file-attributes fails for either $PWD or default-directory, instead of failing out of the top level. This fixes a regression from Emacs 26 (Bug#42903). --- lisp/startup.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index bff10003f8..364689ccdb 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -649,11 +649,12 @@ It is the default value of the variable `top-level'." ;; Use FOO/., so that if FOO is a symlink, file-attributes ;; describes the directory linked to, not FOO itself. (or (and default-directory - (equal (file-attributes - (concat (file-name-as-directory pwd) ".")) - (file-attributes - (concat (file-name-as-directory default-directory) - ".")))) + (ignore-errors + (equal (file-attributes + (concat (file-name-as-directory pwd) ".")) + (file-attributes + (concat (file-name-as-directory default-directory) + "."))))) (setq process-environment (delete (concat "PWD=" pwd) process-environment))))) -- 2.17.1 --------------AB11FCCB3388ECA1D192A65F--