GNU bug report logs -
#48579
28.0.50; Spawning an emacs process using call-process results in inconsistent behavior between GNU/Linux and macOS
Previous Next
Reported by: Raj Krishnan <rajkrishnan1996 <at> gmail.com>
Date: Sat, 22 May 2021 07:36:02 UTC
Severity: minor
Tags: wontfix
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 48579 <at> debbugs.gnu.org (full text, mbox):
On Sat, May 22, 2021 at 11:00:43AM +0530, Raj Krishnan wrote:
> Steps for reproduction:
> 1. Run =emacs -Q= in some directory outside the user's home directory
> 2. Check the value of the variable =default-directory=, and verify that
> it matches the directory you started emacs in
> 3. Create an emacs child process using:
>
> #+begin_src emacs_lisp
> (call-process
> (file-truename (expand-file-name invocation-name invocation-directory))
> nil nil nil "-Q")
> #+end_src
>
> 4. In the newly created frame, check the value of the default directory
>
> 5. Behavior on GNU/Linux: The directory matches the value shown in (2)
> Behavior on macOS: The default directory has changed to the user's
> home directory
>
> The behavior was spotted when we noticed inconsistent behavior in
> [[https://github.com/minad/affe][affe.el]], which was subsequently
> reproduced using =emacs -Q=
The NS port checks if it's connected to a TTY when it starts, and if
not assumes it's being run from finder and so sets the starting
directory to something useful ($HOME), instead of / or whatever it
defaults to.
--
Alan Third
This bug report was last modified 2 years and 310 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.