From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: init_buffer PWD fix Date: Wed, 24 Apr 2002 13:21:28 -0700 (PDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200204242021.g3OKLS704607@shade.twinsun.com> References: <8296-Wed24Apr2002190326+0300-eliz@is.elta.co.il> <200204241919.g3OJJ3104590@shade.twinsun.com> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019679871 3850 127.0.0.1 (24 Apr 2002 20:24:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 24 Apr 2002 20:24:31 +0000 (UTC) Cc: emacs-devel@gnu.org, knagano@sodan.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 170TJX-0000zz-00 for ; Wed, 24 Apr 2002 22:24:31 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 170TLM-0004Gc-00 for ; Wed, 24 Apr 2002 22:26:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 170TJJ-0004W9-00; Wed, 24 Apr 2002 16:24:17 -0400 Original-Received: from alcor.twinsun.com ([198.147.65.9]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 170TGb-0004PX-00 for ; Wed, 24 Apr 2002 16:21:30 -0400 Original-Received: from shade.twinsun.com ([192.54.239.27]) by alcor.twinsun.com (8.12.1/8.12.1) with ESMTP id g3OKLSPd026968; Wed, 24 Apr 2002 13:21:28 -0700 (PDT) Original-Received: (eggert@localhost) by shade.twinsun.com (8.11.6+Sun/8.11.6) id g3OKLS704607; Wed, 24 Apr 2002 13:21:28 -0700 (PDT) Original-To: himi@meadowy.org In-Reply-To: (himi@meadowy.org) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3217 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3217 > From: MIYASHITA Hisashi > 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.