From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp 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: Sun, 23 May 2021 12:30:36 +0200 Message-ID: References: <2d81bff4-21fc-ce96-f1f1-f0bbf60b233e@daniel-mendler.de> <837djrklhx.fsf@gnu.org> <831r9zkkaq.fsf@gnu.org> <83y2c6kj9q.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27177"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Alan Third , 48579@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 23 12:31:11 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 1lklO2-0006ry-7y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 May 2021 12:31:10 +0200 Original-Received: from localhost ([::1]:54052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lklO1-00025t-9o for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 May 2021 06:31:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lklNu-00025T-Ne for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lklNu-0002e3-Fp for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lklNu-0007dk-BT for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 06:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 May 2021 10:31: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.162176584628431 (code B ref 48579); Sun, 23 May 2021 10:31:02 +0000 Original-Received: (at 48579) by debbugs.gnu.org; 23 May 2021 10:30:46 +0000 Original-Received: from localhost ([127.0.0.1]:40651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lklNd-0007O6-QV for submit@debbugs.gnu.org; Sun, 23 May 2021 06:30:46 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:40607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lklNb-0007GU-48 for 48579@debbugs.gnu.org; Sun, 23 May 2021 06:30:45 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id z17so25415727wrq.7 for <48579@debbugs.gnu.org>; Sun, 23 May 2021 03:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=e73TumUDZBvOtqOs8VWUVtkYdRsicq5hkeRtz6z0DpM=; b=iAOUt7KBA60I5xPXtizY6RZM/4wZIttiEBplX0dkx0ytQF5c1uxxg6MitAF4ByFFk6 YAE7Z2Qe0hiTwwVkxK5+s6BB3ADXcxiiM/mPi6AlNkfrWDs3l2NpvMUcpiU7DIY14zyf GFMKQV4IqwUkV9DT3kn+6L7zjvyUFzOCjYvI1Z0WZCRvdcSkvB729Mel6tjqfNVSKgDv Xc/aKE0cRkb1qWAQ2z0DA2lyTpRXnt2ZgVSXDJwQytMSmkk7mWDWxRFwN8rcX0Do9Nhr pcpErzihlN1B4JuHTitmLjjBQ27swDy3kgSSW9k+pc/uXQrw8d7E8xROSmntnjY6B59M uyTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=e73TumUDZBvOtqOs8VWUVtkYdRsicq5hkeRtz6z0DpM=; b=SpwWNPiy1swQCyCry8wGaYKJwNQFMHjbDJXYRj+ADCRRVuoBTwp9H3qMqjrnxQoRkz on1ixO0/hYFWEoUnLA4osmc9peUB/tH8OGrSmoZb3no7Z/J4DF+eLF4vjOEle8o1/Yay 0sBsBOS4whLMKjtSDBUKiGJvjNThx5rTizGMu6QnwnvPNKIFF/0EbqiAoPCMKp0btlFy NN4ZxyO1puLy8XkmHts1TGkfYmXV9eBDQCxus6G52a/29N3nzuJ+awSTXVl4MsS/CjsA vjnyRTYnlU6KWbA60Wemhu8DJBffMhNzfeCNJk+zW4+FlZ8x2d//bRTESEIGDpepP235 BcUg== X-Gm-Message-State: AOAM532YaAE4+sTbBIQl535Y3QsUPvEpU0+q/mFcc1EieSjy+iyMu+5V rgYHVU/GcqBa6Kx6VFSZr9Y= X-Google-Smtp-Source: ABdhPJyHNmaYGguQLnP+f3XoLHlwwXepCq9a4H0tV28Ytr1+5LmG/EZdrgZoCsQNG5wdf/yZMOqtNQ== X-Received: by 2002:a05:6000:12cc:: with SMTP id l12mr17129200wrx.91.1621765837214; Sun, 23 May 2021 03:30:37 -0700 (PDT) Original-Received: from smtpclient.apple ([46.128.198.100]) by smtp.gmail.com with ESMTPSA id f18sm3153537wmc.40.2021.05.23.03.30.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 May 2021 03:30:36 -0700 (PDT) In-Reply-To: <83y2c6kj9q.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.80.0.2.43) 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:207081 Archived-At: > Am 22.05.2021 um 15:09 schrieb Eli Zaretskii : >=20 > If you want to make sure that the default-directory of *scratch* is > the directory where Emacs was started, we could add such a feature (it > doesn't exists now, and relying on what you see on GNU/Linux means you > are relying on one particular implementation). However, even if we do > introduce such a feature, that still won't tell you anything about the > cwd of the Emacs process. If this latter aspect is what you really > care about, you will have to explain the rationale, because I don't > see how it could be important. >=20 The actual working directory as seen by the kernel/process should indeed = be irrelevant. What matters is that when processing command-line = arguments in batch mode, Emacs behaves like other Unix tools in that it = resolves relative filenames as relative to the working directory that = was current when the process was started. In other words, when = executing emacs -Q -batch -eval '(print default-directory)' from a shell, Emacs must always print a representation of the shell's = current working directory (ignoring corner cases such as "default = directory has been removed during process startup"). Guaranteeing that = (a) when processing command-line arguments the *scratch* buffer is = current (unless changed by a previous command-line argument), and (b) = its default directory will be set to a representation of the initial = process working directory should ensure that. I guess that's already = the case for all operating systems, and we only need to document it.=