emacs-devel
[Top][All Lists]
Advanced

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

Re: init_buffer PWD fix


From: 宮下 尚:HIMI
Subject: Re: init_buffer PWD fix
Date: Thu, 25 Apr 2002 06:23:16 +0900
User-agent: T-gnus/6.15.4 (based on Oort Gnus v0.04) (revision 11) SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.1 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/1.99 Alpha1 (AWOFUCHI)

Paul Eggert <address@hidden> writes:

>> I can't understand why you stick to "PWD" environment variable on Windows.
>> The information almost all of the application dose not set is so important?
>
> Yes, it's important; and once w32.c is fixed it will not be ignored.

This word forcibly reminds me that it was very hard for me to
persuade Emacs developpers on the issues of Windows.  I think we
should even remove such hard-to-understand code in purely technical view.
But I think users' convenience takes the highest priority, I can agree
on the code.

>> On Unix, shell and lots of programs usually put "nicer" pathname to "PWD".
>> On Windows, most programs put "nicer" pathname to Get/SetCurrentDirectory().
>
> On Windows, if I pass a string to SetCurrentDirectory, and then later
> inquire about the string with GetCurrentDirectory, do I always get the
> same string back, no matter how it was spelled?  Or do some Windows
> platforms return a munged copy of the original string?  If the latter,
> then there will be some cases where PWD will be nicer than
> GetCurrentDirectory.

I've tested that in the previous mail, please see it.

>> Otherwise, would you really make convenience for few applications
>> that set "PWD".  To make matters worse, because of such applications,
>> "PWD" may has wrong value
>
> Once w32.c is fixed, the worst that will happen is that Emacs will use
> some other name for the working directory, a name that the user
> specified at some point (though perhaps not the most recently).  I
> don't see this as being a major problem, any more than I see that it's
> a major problem that a similar thing happens on Unix.

But I think we should not ignore the case by pervading such bizarre code
to any platforms.

>> > On Solaris 8, the standard shell program /bin/sh is not a POSIX shell,
>> > and it does not set PWD.  The situations are analogous.
>> 
>> And then, why do you use getcwd() instead of "PWD" on Unix?  It's because
>> getcwd() normalize pathname, and it's incovenient for many users, isn't it?
>
> Many applications use getcwd because of inertia: getcwd predates PWD.
> Also, PWD is more of a pain to get right, so many applications don't
> bother to use it since they don't display the name to the user; GNU
> 'tar' is in this category.
>
> However, programs like Emacs and the shells do tend to use PWD,
> because they often present the working directory's name to the user,
> and it's more important for them to use a "nice" name.

I hope that you had quater tenderness for Windows users ;-)

  With regards,

from himi




reply via email to

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