From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48579: 28.0.50; Spawning an emacs process using call-process results in inconsistent behavior between GNU/Linux and macOS Date: Sat, 22 May 2021 13:39:03 +0300 Message-ID: <83a6onkq7s.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25523"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rajkrishnan1996@gmail.com, 48579@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 12:40:10 2021 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 1lkP3C-0006TQ-5Z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 12:40:10 +0200 Original-Received: from localhost ([::1]:47826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkP3B-0008Fp-6B for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 06:40:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkP34-0008Fb-9d for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 06:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkP34-00023K-1e for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 06:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkP33-0000TN-UZ for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 06:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2021 10:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48579 X-GNU-PR-Package: emacs Original-Received: via spool by 48579-submit@debbugs.gnu.org id=B48579.16216799541742 (code B ref 48579); Sat, 22 May 2021 10:40:01 +0000 Original-Received: (at 48579) by debbugs.gnu.org; 22 May 2021 10:39:14 +0000 Original-Received: from localhost ([127.0.0.1]:38361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkP2I-0000S1-80 for submit@debbugs.gnu.org; Sat, 22 May 2021 06:39:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkP2E-0000Rf-1t for 48579@debbugs.gnu.org; Sat, 22 May 2021 06:39:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56942) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkP27-0001i0-64; Sat, 22 May 2021 06:39:03 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3769 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkP26-0003PG-OQ; Sat, 22 May 2021 06:39:03 -0400 In-Reply-To: (message from Alan Third on Sat, 22 May 2021 11:26:16 +0100) 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:207024 Archived-At: > Date: Sat, 22 May 2021 11:26:16 +0100 > From: Alan Third > Cc: 48579@debbugs.gnu.org > > > 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. I think any Lisp program that assumes something about the directory of the *scratch* buffer based on where Emacs was invoked is buggy. E.g., on MS-Windows one can specify a starting directory for Emacs via the properties of the Emacs desktop icon, and Lisp programs have no way of knowing where that is. Lisp programs that want rely on the value of the default directory should explicitly call 'cd' to change to that directory (passing it via command-line arguments if necessary, as it probably is in the case in point). Bottom line: I don't see any Emacs bug here.