emacs-devel
[Top][All Lists]
Advanced

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

Re: init_buffer PWD fix


From: Eli Zaretskii
Subject: Re: init_buffer PWD fix
Date: Mon, 22 Apr 2002 11:01:27 +0300 (IDT)

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



reply via email to

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