🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #703

emacs 18.58: invalid default-directory after su

#703
From: Tim Pierce
Date: Sat, 15 Aug 1992 18:39
20 lines
1432 bytes
I am running Emacs 18.58 under Ultrix 4.2 here (on a DECstation
5000/133) and encountered the following peculiar problem.  When I "su
root", change to another directory, and invoke emacs, the value of
default-directory is initialized to what my directory was _before_ the
su, making things rather annoying when I use find-file, for example.

Peeking at files.el and startup.el tells me that Emacs initializes
default-directory on startup to the value of the PWD environment
variable, which is inherited from the environment of its parent
process.  I suspect this is caused by the fact that my login shell is
tcsh while root's is csh.

Naturally, I could avoid this by changing either my login shell or
root's, or doing "su - root" rather than "su root".  But it doesn't
seem like I should HAVE to.  Any thoughts?

-- 
____ Tim Pierce                / "Bisexual just means you pay for it."
\  / twpierce@amherst.edu      /  
 \/ (BITnet: TWPIERCE@AMHERST) /   -- Rock Hudson
Technical Details
Message-ID: <1992Aug15.183951.1066@amhux2.amherst.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!amhux1.amherst.edu!twpierce

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!amhux1.amherst.edu!twpierce
From: twpierce@amhux1.amherst.edu (Tim Pierce)
Subject: emacs 18.58: invalid default-directory after su
Message-ID: <1992Aug15.183951.1066@amhux2.amherst.edu>
Sender: gnulists@ai.mit.edu
Organization: Amherst College, Amherst MA
Distribution: gnu
Date: Sat, 15 Aug 1992 18:39:51 GMT
Approved: bug-gnu-emacs@prep.ai.mit.edu
Lines: 21