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

Package: emacs;

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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: alan <at> idiocy.org, 48579 <at> debbugs.gnu.org
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 16:09:05 +0300
> Cc: alan <at> idiocy.org, 48579 <at> debbugs.gnu.org
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Date: Sat, 22 May 2021 14:54:26 +0200
> 
> > Right, no roadblocks.  And Emacs does determine that, for its own
> > purposes, on all platforms.  It just doesn't expose that to Lisp.
> 
> This statement does not seem correct to me. There is a default-directory
> which I can access in the initial *scratch* buffer. Something is exposed
> here.

We are mis-communicating.  All I'm saying is that this
default-directory is not (and doesn't have to be) the cwd of the Emacs
process.

> But this discussion here seems to be a bit off-track. My point here is
> that the current working directory determination on MacOS uses a
> heuristic, which is not correct. It incorrectly determines that Emacs
> has been launched from the finder or some other Mac GUI application and
> therefore changes the directory to the home directory. If Emacs is
> indeed started from the GUI, this makes all sense. But this is not the
> case here. The TTY heuristic, that Alan described, is insufficient.

I don't see why it matters what logic Emacs follows on macOS when its
starts, wrt the cwd of the Emacs process.

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.




This bug report was last modified 3 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.