all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: 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: Sat, 22 May 2021 14:01:06 +0100	[thread overview]
Message-ID: <YKkAkmNpUlCPdZxO@idiocy.org> (raw)
In-Reply-To: <9002b376-2ef7-db7d-9d7a-092cda82efe1@daniel-mendler.de>

On Sat, May 22, 2021 at 02:14:53PM +0200, Daniel Mendler wrote:
> On 5/22/21 2:06 PM, Alan Third wrote:
> > On Sat, May 22, 2021 at 01:44:27PM +0200, Daniel Mendler wrote:
> >> Both GNU/Linux and macOS are Unixes, it is expected that Emacs behaves
> >> in the same way on both platforms with regards to handling the current
> >> directory. When Emacs is started via the command line or via forking
> >> from another process, Emacs should inherit the default directory from
> >> the parent process. If Emacs is started via some special finder or
> >> desktop application, the default directory of that finder application is
> >> taken. This is all predictable and expected.
> > 
> > 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,

You kind of are. The only reason this would happen is that the emacs
executable you're executing is within the GUI app bundle or at least
has been built to run as such.

> 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?

You can run with "-t", "-nw", "--chdir", "--batch" or "--script" to
disable this behaviour.

-- 
Alan Third





  parent reply	other threads:[~2021-05-22 13:01 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 [this message]
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

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=YKkAkmNpUlCPdZxO@idiocy.org \
    --to=alan@idiocy.org \
    --cc=48579@debbugs.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.