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: Thu, 13 Aug 2020 16:52:41 +0200 (CEST) Message-ID: <20200813145237.GA26932@breton.holly.idiocy.org> References: <460AAF63-B6EC-4AE7-8259-1808D46A5BFD@toadstyle.org> <20200812225244.GB42658@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu To: Sean Devlin , 42836@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 13 16:53:11 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 1k6EbO-0009pY-OA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 16:53:10 +0200 Original-Received: from localhost ([::1]:51918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6EbN-0007TP-Qk for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 10:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6EbG-0007SP-Iz for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 10:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6EbG-0005du-8y for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 10:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6EbG-0007O5-6S for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 10:53:02 -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 14:53:02 +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.159733037428382 (code B ref 42836); Thu, 13 Aug 2020 14:53:02 +0000 Original-Received: (at 42836) by debbugs.gnu.org; 13 Aug 2020 14:52:54 +0000 Original-Received: from localhost ([127.0.0.1]:50631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6Eb7-0007Ni-Pw for submit@debbugs.gnu.org; Thu, 13 Aug 2020 10:52:54 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:46840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6Eb6-0007NU-0E for 42836@debbugs.gnu.org; Thu, 13 Aug 2020 10:52:53 -0400 Original-Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 179ED1F65; Thu, 13 Aug 2020 16:52:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597330365; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; l=1061; bh=skmUFuy2IoecV/ajFZuE4zBSMjMaxPfJ/gFLesfo1jo=; b=ms7lDv+GQdiwJBUSNCEJYyzdHXYJatVQEsbNw06AzpFkf0AcWhJ0FFaRU6Ft5RLp FdufOCtVqQiAz3hdsBUsZi1qveDFSeNk56Ui/2/iHtDS1ZzXXVBFv3kejX7QcMf/n64 jTd8hPmqA4J6AHe7WlktGmhYECUgjSB6/wUrVVg2S0fhP9ypD6fkJZGQApBnxy1mcai Q2DhX8eoPk97DBCv/lbfzuCxtzS9EVcc7V8iVw67ybNQCGyQeho+FyPH2+2XlxbibhH dCHMSnOASDvpgUP/N6cP4Qikg3Jwhh9paQAHs+Yb/YGwQQhAVYGIYyI9Xl3MdGd7jIf ZZReokb2pw== Original-Received: by smtp.mailfence.com with ESMTPA ; Thu, 13 Aug 2020 16:52:39 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 9FE07202481371; Thu, 13 Aug 2020 15:52:37 +0100 (BST) Mail-Followup-To: Alan Third , Sean Devlin , 42836@debbugs.gnu.org, eggert@cs.ucla.edu Content-Disposition: inline In-Reply-To: <20200812225244.GB42658@breton.holly.idiocy.org> 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:185032 Archived-At: On Thu, Aug 13, 2020 at 12:52:51AM +0200, Alan Third wrote: > On Wed, Aug 12, 2020 at 05:17:28PM -0400, Sean Devlin wrote: > > > When I open Emacs 27.1 by invoking the executable directly (i.e. the > > > last method above), the default-directory in those buffers is "~/“. > > > > Correction: the default directory is the working directory of the > > parent process (i.e. the shell) in this case. > > The code at line 1623 of emacs.c appears to be supposed to set the > correct starting directory, however it doesn't matter what it does > there. I've tried hard coding directories and all sorts, but it ALWAYS > ends up starting in "/"... I think something somewhere else must be > resetting it. I can't find where just now. I may have to do a git bisect, > which I don't much fancy. The commit in question is: 900276502fbb4dcabdabc5d7d24b4bc5645f2cf3 Act like POSIX sh if $HOME is relative 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? -- Alan Third