[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PWD is not seen by my emacs installation
From: |
Patrick Mahan |
Subject: |
Re: PWD is not seen by my emacs installation |
Date: |
Wed, 9 Aug 2023 13:21:36 -0700 |
On Tue, Aug 8, 2023 at 10:38 PM Rudolf Schlatte <rudi@constantly.at> wrote:
> Patrick Mahan <plmahan@gmail.com> writes:
> >> How did you invoke emacs? If you start it from some graphical MacOS
> >> environment, may PWD _is_ undefined (I know nothing about MacOS)? Did
> you
> >> cd into
> >> /Users/mahan/src/PPP/ppp-master/pppd in a shell and start emacs from
> >> the command line from there?
> >>
> >>
> > Thanks! That was a good suggestion. I was using the Mac OS X 'open'
> > command which is probably, as you suggested, not picking up the correct
> > environment, though oddly it is picking up the PATH correctly.
>
> In that case, you can write "open -a Emacs.app /path/to/somefile.txt"
> and it will be opened by Emacs as expected.
>
> Note that in Emacs, each buffer has its own "current directory", so
> e.g. starting dired when in the "somefile.txt" buffer will display the
> contents of "/path/to".
>
>
Yes, that is what occurs, but my issue is the need to give the full path
(or even a relative path off of '~'). I just want to edit the file in the
local directory. I do not want to have to say "open -a Emacs.app
$PWD/file.txt" just to open a local file.
I also tried using the --env option to the open command but it does not
seem to work.
Invoking it directly works correctly.
Thanks,
Patrick
Re: PWD is not seen by my emacs installation, Rudolf Adamkovič, 2023/08/30