From: Patrick Mahan <plmahan@gmail.com>
To: stefan-husmann@t-online.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: PWD is not seen by my emacs installation
Date: Tue, 8 Aug 2023 14:21:50 -0700 [thread overview]
Message-ID: <CAFDHx1+4QwuqcfWJoysp2pAr-U5omukrLuRMAGwiTbAAMMWF8A@mail.gmail.com> (raw)
In-Reply-To: <87wmy52v3f.fsf@frege.mail-host-address-is-not-set>
On Tue, Aug 8, 2023 at 12:27 PM <stefan-husmann@t-online.de> wrote:
>
> Patrick Mahan <plmahan@gmail.com> writes:
>
> > Hardware -
> >
> > Macbook Pro 14" (Apple M1 Pro)
> > Mac OS 13.1 (Ventura)
> >
> > Emacs -
> >
> > Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00
> > Version 12.0.1 (Build 21A559)) of 2022-09-12)
> >
> > My emacs does not see the current directory, but instead is expecting
> > everything to be under ~/. I thought emacs grokked the PWD environment
> > variable.
> >
> > From my shell -
> >
> > % echo $PWD
> > /Users/mahan/src/PPP/ppp-master/pppd
> >
> > But inside my .emacs I have -
> >
> > (setq workingdir (getenv "PWD"))
> > message "PWD = '%s'" workingdir)
>
> There is missing a ( at beginning of line? You should get an
> "unbalanced parantheses" message.
>
>
No, there is not, that was a cut-n-paste error.
> >
> > Which results in -
> >
> > PWD = ’nil’
> >
> > Unless I open using a Full pathname, it will not open the file
> > correctly.
>
> What file?
>
If I am in /Users/mahan/src/PPP/ppp-master/pppd and attempt to open
sys-linux.c, it opens an emacs window, but nothing is present. If I look
at the buffers window -
.%* *Messages* 695 Messages
sys-linux.c 0 C/*l ~/sys-linux.c
*scratch* 144 Lisp Interaction
It shows up as being in my home directory.
> >
> > Suggestions?
> >
> > Thanks,
> >
> > Patrick
>
>
> 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.
This was something I took from another user on a mailing list.
Dropping the 'open' and invoking Emacs directly fixes that issue!
Patrick
next prev parent reply other threads:[~2023-08-08 21:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 1:58 PWD is not seen by my emacs installation Patrick Mahan
2023-08-08 12:44 ` tpeplt
[not found] ` <CAFDHx1Jk=jtHhLdThFUeFpfa=yGTXoKYuu0bADYAN-j-7FjSHw@mail.gmail.com>
2023-08-09 0:59 ` tpeplt
2023-08-08 19:07 ` stefan-husmann
2023-08-08 21:21 ` Patrick Mahan [this message]
2023-08-09 5:37 ` Rudolf Schlatte
2023-08-09 20:21 ` Patrick Mahan
2023-08-22 1:14 ` David Masterson
2023-08-22 4:24 ` Patrick Mahan
2023-08-30 22:29 ` Rudolf Adamkovič
2023-08-30 23:43 ` Patrick Mahan
2023-09-03 15:27 ` Rudolf Schlatte
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=CAFDHx1+4QwuqcfWJoysp2pAr-U5omukrLuRMAGwiTbAAMMWF8A@mail.gmail.com \
--to=plmahan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=stefan-husmann@t-online.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.