GNU bug report logs -
#42836
27.1; default-directory is set to "/" after startup
Previous Next
Reported by: Sean Devlin <spd <at> toadstyle.org>
Date: Wed, 12 Aug 2020 20:55:01 UTC
Severity: normal
Merged with 44446
Found in version 27.1
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 4 years and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.