unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: emacs-devel@gnu.org
Subject: Re: path, cwd in NS port
Date: Thu, 28 May 2020 13:45:17 -0400	[thread overview]
Message-ID: <jwv4ks0klja.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200528110037.53f0b487@jabberwock.cb.piermont.com> (Perry E. Metzger's message of "Thu, 28 May 2020 11:00:37 -0400")

> I would like to make it possible for a user to at least correct this
> situation in their .emacs by knowing when Emacs has been invoked by
> launching the .app versus when it has been invoked from the command
> line (and has the proper PATH set etc.)

I don't know if that can be easily detected, but you can simply try
something like the following in your .emacs:

    (when (equal default-directory "/") (cd "~/"))

> Note that in a theoretical sense such an issue probably exists on
> other platforms (or might in the future) so something clean would
> be good.

At leas under GNU/Linux, I can't think of any reason a GUI desktop
environment would use "/" as the starting directory for an application
unless maybe that app is started as root.

Then again, that same reasoning implies that it's braindead for macOS to
do just that.  I take it as an implicit statement on the part of Apple
that they really intend to move towards single-user systems (as is
basically the case for their iOS devices already)


        Stefan




  parent reply	other threads:[~2020-05-28 17:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 15:00 path, cwd in NS port Perry E. Metzger
2020-05-28 16:10 ` Eli Zaretskii
2020-05-28 16:31   ` Perry E. Metzger
2020-05-28 20:46     ` Alan Third
2020-05-28 22:30       ` 조성빈
2020-05-30  1:03       ` Perry E. Metzger
2020-05-28 22:38     ` 조성빈
2020-05-28 22:52       ` Stefan Monnier
2020-05-30  0:48         ` 조성빈
2020-05-30 14:17           ` Stefan Monnier
2020-05-28 17:45 ` Stefan Monnier [this message]
2020-05-28 20:30   ` Perry E. Metzger

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4ks0klja.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=perry@piermont.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).