all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Raj Krishnan <rajkrishnan1996@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 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: Sat, 22 May 2021 17:05:58 +0530	[thread overview]
Message-ID: <CAOotCtMkffDtDsae6-CbCzpCy-hd=ia0KqqtkGur2W2z3V0zUw@mail.gmail.com> (raw)
In-Reply-To: <83a6onkq7s.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]

Thanks Alan, Eli!


Adam's comment seems to be the root cause of this.

One extra dot on your point Eli: this happens in case we run the
command in a regular buffer as well, not just in the scratch buffer.

Explicitly specifying the directory we expect to be in seems cleaner,
and we shall pass along a chdir flag to call-process, in order
to switch directories.

On Sat, May 22, 2021, 4:09 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 22 May 2021 11:26:16 +0100
> > From: Alan Third <alan@idiocy.org>
> > Cc: 48579@debbugs.gnu.org
> >
> > > 5. Behavior on GNU/Linux: The directory matches the value shown in (2)
> > >    Behavior on macOS: The default directory has changed to the user's
> > >    home directory
> > >
> > > The behavior was spotted when we noticed inconsistent behavior in
> > > [[https://github.com/minad/affe][affe.el]], which was subsequently
> > > reproduced using =emacs -Q=
> >
> > The NS port checks if it's connected to a TTY when it starts, and if
> > not assumes it's being run from finder and so sets the starting
> > directory to something useful ($HOME), instead of / or whatever it
> > defaults to.
>
> I think any Lisp program that assumes something about the directory of
> the *scratch* buffer based on where Emacs was invoked is buggy.  E.g.,
> on MS-Windows one can specify a starting directory for Emacs via the
> properties of the Emacs desktop icon, and Lisp programs have no way of
> knowing where that is.
>
> Lisp programs that want rely on the value of the default directory
> should explicitly call 'cd' to change to that directory (passing it
> via command-line arguments if necessary, as it probably is in the case
> in point).
>
> Bottom line: I don't see any Emacs bug here.
>

[-- Attachment #2: Type: text/html, Size: 2702 bytes --]

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

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='CAOotCtMkffDtDsae6-CbCzpCy-hd=ia0KqqtkGur2W2z3V0zUw@mail.gmail.com' \
    --to=rajkrishnan1996@gmail.com \
    --cc=48579@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=eliz@gnu.org \
    /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.