From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler 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 14:41:22 +0200 Message-ID: <8865a048-d989-e08b-80c9-0d793b85cf5a@daniel-mendler.de> References: <2d81bff4-21fc-ce96-f1f1-f0bbf60b233e@daniel-mendler.de> <9002b376-2ef7-db7d-9d7a-092cda82efe1@daniel-mendler.de> <834kevkl4b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, 48579@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 14:42: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 1lkQxG-0005ty-17 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 14:42:10 +0200 Original-Received: from localhost ([::1]:59226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkQxF-0007BW-4Z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 08:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkQx8-0007BB-Fq for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 08:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkQx8-0002eB-8C for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 08:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkQx8-0007mi-6Z for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 08:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2021 12:42:02 +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.162168729129886 (code B ref 48579); Sat, 22 May 2021 12:42:02 +0000 Original-Received: (at 48579) by debbugs.gnu.org; 22 May 2021 12:41:31 +0000 Original-Received: from localhost ([127.0.0.1]:38487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQwc-0007ly-QT for submit@debbugs.gnu.org; Sat, 22 May 2021 08:41:31 -0400 Original-Received: from server.qxqx.de ([178.63.65.180]:53709 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQwa-0007ll-TM for 48579@debbugs.gnu.org; Sat, 22 May 2021 08:41:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9qhCMl1QVYLlJftFWw9l3wiIOJPCYBbysgMyXbn+JIw=; b=HP1IJUS2LAPidEZ76DFe/YO8l2 uCBfJh0T4Q3uBFakqAummVXurirgSPkHlHyM3ijVXP0DUCGB43KKG+JS32POwwp9WY3iii+9ADVFJ W+gF8+s6Vn2XREG2lngVAEx1chIQI2R/89LINDgGJYAh5/L2vj/MkW+2CJ8YpYvnL5x0=; In-Reply-To: <834kevkl4b.fsf@gnu.org> Content-Language: en-US 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:207042 Archived-At: On 5/22/21 2:29 PM, Eli Zaretskii wrote: >> From: Daniel Mendler >> Date: Sat, 22 May 2021 14:14:53 +0200 >> >>> If you want Emacs on macOS to work like a Unix command line app, then >>> build it as a Unix command line app, not a macOS GUI app. >> >> I am not talking about GUI vs terminal, the problem here is if Emacs is >> started from a script. Would it be possible to adjust the directory >> changing behavior, for example if Emacs is started with the arguments >> `--daemon`, `--batch` or `--script`? Is there another way to detect if >> the finder launched Emacs, such that only in that case the directory >> changing to the home directory takes place? > > That won't help. The initial directory in which Emacs starts can be > controlled that way, but that's not what you will see in some random > buffer's default-directory. It is completely OK for Emacs to change > its cwd, as far as the OS is concerned, after it was started, because > that directory doesn't affect how Emacs works. I am not talking about a random directory of some random buffer. Of course these buffers have default-directories depending on if a file is visited and so on. I am talking about the default-directory of the initial *scratch* buffer, which runs the script loaded directly after launch. This is relevant in case you want to start worker jobs executing some code asynchronously for example, related to the current discussion on the mailing list (emacsclient in elisp). Daniel