From: Philipp <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Daniel Mendler <mail@daniel-mendler.de>,
Alan Third <alan@idiocy.org>,
48579@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: Sun, 23 May 2021 12:30:36 +0200 [thread overview]
Message-ID: <CF785650-A4E7-42E5-870B-A1384CDAABEB@gmail.com> (raw)
In-Reply-To: <83y2c6kj9q.fsf@gnu.org>
> Am 22.05.2021 um 15:09 schrieb Eli Zaretskii <eliz@gnu.org>:
>
> 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.
>
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.
prev parent reply other threads:[~2021-05-23 10:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-22 5:30 bug#48579: 28.0.50; Spawning an emacs process using call-process results in inconsistent behavior between GNU/Linux and macOS Raj Krishnan
2021-05-22 10:26 ` Alan Third
2021-05-22 10:39 ` Eli Zaretskii
2021-05-22 11:35 ` Raj Krishnan
2021-05-22 11:44 ` bug#48579: 28.0.50; Spawning an emacs process using call-process results in inconsistent, " Daniel Mendler
2021-05-22 12:06 ` Alan Third
2021-05-22 12:14 ` Daniel Mendler
2021-05-22 12:29 ` Eli Zaretskii
2021-05-22 12:41 ` Daniel Mendler
2021-05-22 12:47 ` Eli Zaretskii
2021-05-22 13:01 ` Alan Third
2021-05-22 13:10 ` Daniel Mendler
2021-05-22 13:10 ` Eli Zaretskii
2021-05-22 13:15 ` Daniel Mendler
2022-07-15 10:01 ` bug#48579: 28.0.50; Spawning an emacs process using call-process results in inconsistent " Lars Ingebrigtsen
2021-05-22 12:20 ` bug#48579: 28.0.50; Spawning an emacs process using call-process results in inconsistent, " Eli Zaretskii
2021-05-22 12:37 ` Daniel Mendler
2021-05-22 12:46 ` Eli Zaretskii
2021-05-22 12:54 ` Daniel Mendler
2021-05-22 13:04 ` Alan Third
2021-05-22 13:13 ` Daniel Mendler
2021-05-22 13:20 ` Daniel Mendler
2021-05-22 13:09 ` Eli Zaretskii
2021-05-23 10:30 ` Philipp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CF785650-A4E7-42E5-870B-A1384CDAABEB@gmail.com \
--to=p.stephani2@gmail.com \
--cc=48579@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=eliz@gnu.org \
--cc=mail@daniel-mendler.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.