From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#42836: 27.1; default-directory is set to "/" after startup Date: Fri, 14 Aug 2020 00:06:34 +0200 (CEST) Message-ID: <20200813220631.GA43629@breton.holly.idiocy.org> References: <460AAF63-B6EC-4AE7-8259-1808D46A5BFD@toadstyle.org> <20200812225244.GB42658@breton.holly.idiocy.org> <20200813145237.GA26932@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32719"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sean Devlin , 42836@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 14 00:07:13 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 1k6LNP-0008NS-Nt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Aug 2020 00:07:11 +0200 Original-Received: from localhost ([::1]:41936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6LNO-0002A8-6b for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 18:07:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6LNG-00029s-FB for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 18:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6LNG-0000nA-5P for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 18:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6LNF-0002ag-W1 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 18:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2020 22:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42836 X-GNU-PR-Package: emacs Original-Received: via spool by 42836-submit@debbugs.gnu.org id=B42836.15973564069934 (code B ref 42836); Thu, 13 Aug 2020 22:07:01 +0000 Original-Received: (at 42836) by debbugs.gnu.org; 13 Aug 2020 22:06:46 +0000 Original-Received: from localhost ([127.0.0.1]:51349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6LMz-0002aA-SG for submit@debbugs.gnu.org; Thu, 13 Aug 2020 18:06:46 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:58670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6LMx-0002Zv-ES for 42836@debbugs.gnu.org; Thu, 13 Aug 2020 18:06:44 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 06F86D38; Fri, 14 Aug 2020 00:06:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597356397; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=548; bh=G0ocGaR7pxAbnueI2lPKb4BHJbfUDiVV1HMEwCu1L1w=; b=C6yUyM8SAs6WE/V6Ik+kk1XbM6wA5n33zFWtj1N4Vw8AcFhDfjgJXY+QSV0yRopr HCk6aVgi5/mkTv47bGPuXIRO7KN5libAr+qLQdlIvoYhVgNGAXMEZ6psP10N7n/Rcke IDO7FmPzYSvf7cD8ukHvr1qKjK6wNmQlBWJvRppe3XzlrNtQ4DjY9kOPHiY+2nqPTFj EJQhd502UGNKupBn7OSSVs39h+gNY7m41NuUmXYgYhVxUKNBlydS74Frd53ERnUNRcI fdkk+OUgyAMjxE6VV8yGiUo9XuS3+Ni1yluYbnnFuzj20yUYyRuWymoUaYUk5D9R0wO DdXP/m4J4w== Original-Received: by smtp.mailfence.com with ESMTPA ; Fri, 14 Aug 2020 00:06:33 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 2DE402024861F9; Thu, 13 Aug 2020 23:06:31 +0100 (BST) Mail-Followup-To: Alan Third , Paul Eggert , Sean Devlin , 42836@debbugs.gnu.org Content-Disposition: inline In-Reply-To: X-ContactOffice-Account: com:241649512 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:185075 Archived-At: On Thu, Aug 13, 2020 at 12:54:00PM -0700, Paul Eggert wrote: > On 8/13/20 7:52 AM, Alan Third wrote: > > I suspect the best solution here is to move the code at line > > emacs.c:1623 to before emacs_wd is set. What do you think, Paul? > > It's probably safer to leave the code where it is, and to update emacs_wd if > Emacs chdirs successfully. > > Does the attached patch work for you? If so, I can install it into the > emacs-27 branch. (I don't use macOS so can't easily test it myself.) It works for me. Thanks! -- Alan Third