From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: init_buffer PWD fix Date: Mon, 22 Apr 2002 11:01:27 +0300 (IDT) Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1019459019 21368 127.0.0.1 (22 Apr 2002 07:03:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 22 Apr 2002 07:03:39 +0000 (UTC) Cc: emacs-devel@gnu.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 16zXrO-0005YX-00 for ; Mon, 22 Apr 2002 09:03:38 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16zXrz-00056C-00 for ; Mon, 22 Apr 2002 09:04:15 +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 16zXrE-0000dh-00; Mon, 22 Apr 2002 03:03:28 -0400 Original-Received: from is.elta.co.il ([199.203.121.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zXqc-0000c9-00 for ; Mon, 22 Apr 2002 03:02:51 -0400 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id LAA12692; Mon, 22 Apr 2002 11:01:27 +0300 (IDT) X-Sender: eliz@is Original-To: Keiichiro Nagano In-Reply-To: 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:2984 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2984 On Mon, 22 Apr 2002, Keiichiro Nagano wrote: > Cygwin sh (ash) is a lightweight Bourne shell, which does not > update PWD even when it does chdir. Child processes inherit > environmental variables from their parent processes. So when you > invoke ash from bash, and do 'cd' in ash, then you have an old and now > wrong PWD. Thanks for the explanation. But I still don't see how this would cause a specific failure in Emacs in some situation. Can you describe such a specific failure, complete with the commands to type outside and inside Emacs, and with analysis of what happens inside init_buffer in that case? > Same problems happen when you invoke command.com, cmd.exe, > nmake.exe from the bash shell. Since these programs ignore PWD, I don't see how can this do any harm. Again, a specific example will help. > bash$ cd work # chdir to work... > bash$ printenv PWD # and PWD is updated > /home/work # it's ok > bash$ sh # invoke sh (ash)... > sh$ cd .. # and chdir to /home... > sh$ printenv PWD # how about the PWD? > /home/work # Oh God! Yes, I understand this much, but how does this affect Emacs? You are suggesting a change in Emacs, not in Bash or ash. The mere fact that "printenv PWD" prints a wrong directory is not in itself a problem, especially not a problem for Emacs. > Same problems happen quite often when you 'make' Emacs Lisp products > which have chdir in their 'Makefile's. What practical Emacs-related problems happen in those cases? Can you give an example of such a case, and describe the problems you have with the current Emacs code in that specific example? TIA