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: Wed, 9 Aug 2023 13:21:36 -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="40667"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Rudolf Schlatte Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 09 22:22:23 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 1qTphH-000ALK-AG for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Aug 2023 22:22:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTpgm-0000mn-An; Wed, 09 Aug 2023 16:21:52 -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 1qTpgk-0000mB-LD for help-gnu-emacs@gnu.org; Wed, 09 Aug 2023 16:21:50 -0400 Original-Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTpgj-0007IE-1u for help-gnu-emacs@gnu.org; Wed, 09 Aug 2023 16:21:50 -0400 Original-Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1bfca0ec8b9so173056fac.2 for ; Wed, 09 Aug 2023 13:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691612507; x=1692217307; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U9LGSGWIJ10SWzrchyjMVjaKGgnFwbfx3mPYiPT0pdc=; b=SNOkzSlJXxhnOJanhYWAWIia4YLWyB6tUySDrARrkO2K8ZTavghNKX5lpPkRbc2ToL ZCJUQigngsyR24vzISaNb6075IuGS7+7GUVVnaM55HJPSQ3B7BNRW98p5IBrK76jASiF tXyiLu04WxXvHE4+WTO2ovJMZTnl+DbejuQ9Mrok32VvygLP8cVSdcB1S3ms/TRGaJAF kjBKDd2UqPqAqfamm7BEh6i8DXn3RTfQFhXkpPTMDDEEXavjsNPXR2x3pcnRBVIU5fCx iUKYsh+/jSvxXTjT9lVc//TsOHdM1bEw4DNIH8elzYfdfQRYh01IJqnQQinzHYMVokag G+bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691612507; x=1692217307; 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=U9LGSGWIJ10SWzrchyjMVjaKGgnFwbfx3mPYiPT0pdc=; b=lZZRn8gyS81LSi5ftvg4XvGRwzAa52H5tz4IKZyVqQaYdMrR2W0Bajpl+A5geueC5W KsC3r2IZlGxq1PdYjUkzmQl7L6Tv31qNbCDl38qPS35MaRZlZZ9AG4SDcD2qQhchtUfK FzpvNK4xJkKCM/TNHMMoSTXrkkvi5nN33lLnOEJx8xSEyMBsqiJgoJxBDFXtimaNSrLZ CxpRtwxqZ5paItfp4fenggrYeF3VgVVqJfkwSBkygo6DgkTcmNQ5k2oiE+7cQPONcjlO 0qeVD/7veDdWP7LOQzIHeb/NdEWJt3fzWXIuS3CD/FI9lcfWOFKHrOWX+EomkmpcAxJw L3Vw== X-Gm-Message-State: AOJu0YyyY4HTGVFxUvreYMiZkDb/Ots86IP3IXDD2jm+Bnpt4FBx2BwF MBOxCHMFlUjDpBgNdODCnZvd4rYtAo182URIJ/CiJSHN X-Google-Smtp-Source: AGHT+IGtcD2b0kbqQDTqKPNNeDyKZIW9flaQYuz0MwflV+ay5szNS2FxTeKDk/V94h/mL7eUvk4avASfV5m9wP8tPIA= X-Received: by 2002:a05:6870:33a5:b0:1b3:f1f7:9958 with SMTP id w37-20020a05687033a500b001b3f1f79958mr364292oae.46.1691612507393; Wed, 09 Aug 2023 13:21:47 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2001:4860:4864:20::32; envelope-from=plmahan@gmail.com; helo=mail-oa1-x32.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:144723 Archived-At: On Tue, Aug 8, 2023 at 10:38=E2=80=AFPM Rudolf Schlatte wrote: > Patrick Mahan 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