From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Patrick Mahan Newsgroups: gmane.emacs.help Subject: Re: PWD is not seen by my emacs installation Date: Tue, 8 Aug 2023 14:21:50 -0700 Message-ID: References: <87wmy52v3f.fsf@frege.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38930"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: stefan-husmann@t-online.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 08 23:22:44 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTUA8-000A0y-Is for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Aug 2023 23:22:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTU9Y-0004FN-L7; Tue, 08 Aug 2023 17:22:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTU9U-0004Ev-Qm for help-gnu-emacs@gnu.org; Tue, 08 Aug 2023 17:22:04 -0400 Original-Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTU9S-0000NG-Sc for help-gnu-emacs@gnu.org; Tue, 08 Aug 2023 17:22:04 -0400 Original-Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6b9a2416b1cso5226813a34.2 for ; Tue, 08 Aug 2023 14:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691529721; x=1692134521; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JVTG4Nz7RVCGR3dEgE1UavLiybldmbdhVSznhYB+DlM=; b=UHZcpTT0YsJmrVgIbPXRnKMXA+MrKQZzKtVdni9+h08Qkn9tei3Rc6DHHYTP4mMcHj 2F/YdKQy24zc768uasc+1iA4vK4BjQ7s14HY6wfT6h7Itg68OgxsddnzQejxQjWwdGqI d637ipeNTSdth/K365CUmOODvg70m7NpxAfh09Mu8B2d9vZr4W+WHFw8p3Vq1pdH7lmy 6MrqlsHqSSyB+44eWaQn7oJU+4Oe2wNDzHZ/Ago8OkWXL8IInVey7zpUQhkjeHhAJwad 41r0rTapQCdDgOfDJG1nz8eRQs5CTvZmitZvAo6cQZgRDwN8ishAwZXBvzUkDRbg11BJ uSWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691529721; x=1692134521; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JVTG4Nz7RVCGR3dEgE1UavLiybldmbdhVSznhYB+DlM=; b=KB/v2qmdM6MetZXFd6uPQwagar5olIppR452jZqjxniUp+/LIUB9/6krmRJT+do9hH Q6c0WYilFtew0Y7BUIf3wP6Ao1Zp5dORrz+hPVG48ibHnAgpnSbqtTddzmBTvveGeeNI yvG5s6xHAChFT6DMBnAFgvt1zUBY422cOwRPRug88rBnSwIWTs1EkoQm6qLVBJvmhkWR JCMFtCv98n9ZYJViiZKxoubB6nYUk3Y9BUwaR6Ou3jDq2ScW6bOrJBR+kW8B8/6CDzO+ 9O0UMukOXKR8PGg3OKfFCBMA/YytTB29Wj1wXf281H89p4QNNafNOyWIuFrEx3j+sWCI YCpA== X-Gm-Message-State: AOJu0YyLDdxW90gxbPkIYjM2Wah0Deh3Xn+orE74f4+tLBbuMUTUxYuL DPRpm3njT6/0Ju5uRzOhGVWFlqRiic45mwQpowQ= X-Google-Smtp-Source: AGHT+IG9qnq478x60alcKrfae3naj4EhGi/vmvrazMfPqkLdF9J7IsQn5C91Gx293DJ61OZWCgJe7HMtW5dzXWOCG8k= X-Received: by 2002:a05:6808:221f:b0:3a7:b3e7:54d1 with SMTP id bd31-20020a056808221f00b003a7b3e754d1mr1059327oib.45.1691529721675; Tue, 08 Aug 2023 14:22:01 -0700 (PDT) In-Reply-To: <87wmy52v3f.fsf@frege.mail-host-address-is-not-set> Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=plmahan@gmail.com; helo=mail-ot1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144696 Archived-At: On Tue, Aug 8, 2023 at 12:27=E2=80=AFPM wrote: > > Patrick Mahan 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 =3D '%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 =3D =E2=80=99nil=E2=80=99 > > > > 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