emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: init_buffer PWD fix


From: Paul Eggert
Subject: Re: init_buffer PWD fix
Date: Wed, 24 Apr 2002 13:21:28 -0700 (PDT)

> From: MIYASHITA Hisashi <address@hidden>
> Date: Thu, 25 Apr 2002 04:41:15 +0900
> 
> Why are they no problem?  In the example I offered, after doing it, user
> type "cd c:/Program Files" during cmd.exe session.  But Emacs set the
> default directory to "c:/PROGRA~1".

That is a different scenario.  In this new scenario, you first use a
POSIX shell to set a preferred name with PWD.  You then use a
non-POSIX shell to change the working directory to a different name
for the same directory, without also setting PWD.

Yes, in this case, Emacs will use PWD rather than the name you
specified to the non-POSIX shell.  But this also happens on Unix
platforms with non-POSIX shells.  It is not a problem that is specific
to Windows.  And once we fix the bug in w32.c it will not be that
serious a problem, since Windows Emacs will act like GNU/Linux or Unix
Emacs in this situation.

> > On Unix, most applications don't use $PWD; they use the working
> > directory.  The only applications that set and use $PWD are those
> > that care about using a "nice" name for the working directory.
> 
> I disagree on it.  According to my knowledge, lots of Unix applications
> use "PWD".

Some do, but most don't.  For example, GNU 'tar' doesn't, even though
it uses getcwd (in order to implement the -C option).

> Almost all of shells set "PWD" properly.  But on Windows, even
> the standard shell program, "cmd.exe" dose not set "PWD".

On Solaris 8, the standard shell program /bin/sh is not a POSIX shell,
and it does not set PWD.  The situations are analogous.  I still don't
see why Windows should be treated differently.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]