unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@twinsun.com>
Cc: emacs-devel@gnu.org, knagano@sodan.org
Subject: Re: init_buffer PWD fix
Date: Wed, 24 Apr 2002 14:01:14 -0700 (PDT)	[thread overview]
Message-ID: <200204242101.g3OL1EE04666@shade.twinsun.com> (raw)
In-Reply-To: <ud6wosubi.fsf@MILCH.meadowy.org> (himi@meadowy.org)

> From: MIYASHITA Hisashi <himi@meadowy.org>
> Date: Thu, 25 Apr 2002 05:41:37 +0900
> 
> 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.

> 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.

> 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.

> > 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.

  reply	other threads:[~2002-04-24 21:01 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-21 20:15 init_buffer PWD fix Keiichiro Nagano
2002-04-21 23:00 ` Keiichiro Nagano
2002-04-22  6:18 ` Paul Eggert
2002-04-22  7:20   ` Keiichiro Nagano
2002-04-22 11:15     ` Eli Zaretskii
2002-04-22 21:16     ` Jason Rumney
2002-04-22  7:53   ` Eli Zaretskii
2002-04-22  7:01     ` Paul Eggert
2002-04-22  8:10       ` Eli Zaretskii
2002-04-22  7:22         ` Paul Eggert
2002-04-22 11:14           ` Eli Zaretskii
2002-04-22 23:21             ` Paul Eggert
2002-04-23  6:05               ` Eli Zaretskii
2002-04-22 21:21         ` Jason Rumney
2002-04-23  5:56           ` Eli Zaretskii
2002-04-23  6:14   ` MIYASHITA Hisashi
2002-04-23 11:00     ` Eli Zaretskii
2002-04-24 17:55       ` Richard Stallman
2002-04-24 18:14         ` MIYASHITA Hisashi
2002-04-23 17:45     ` Paul Eggert
2002-04-24  6:52       ` MIYASHITA Hisashi
2002-04-24  7:13         ` Paul Eggert
2002-04-24  7:45           ` MIYASHITA Hisashi
2002-04-24 11:12             ` Eli Zaretskii
2002-04-24 10:30               ` MIYASHITA Hisashi
2002-04-24 16:03                 ` Eli Zaretskii
2002-04-24 17:13                   ` MIYASHITA Hisashi
2002-04-24 18:10                     ` Eli Zaretskii
2002-04-24 18:25                       ` MIYASHITA Hisashi
2002-04-24 19:19                     ` Paul Eggert
2002-04-24 19:41                       ` MIYASHITA Hisashi
2002-04-24 19:59                         ` MIYASHITA Hisashi
2002-04-24 20:21                         ` Paul Eggert
2002-04-24 20:41                           ` MIYASHITA Hisashi
2002-04-24 21:01                             ` Paul Eggert [this message]
2002-04-24 21:23                               ` MIYASHITA Hisashi
2002-04-24 21:35                                 ` MIYASHITA Hisashi
2002-04-25 22:52                                 ` Stefan Monnier
2002-04-25  3:42                             ` Eli Zaretskii
2002-04-24 16:47                 ` Paul Eggert
2002-04-24 17:55                   ` MIYASHITA Hisashi
2002-04-24 10:38               ` MIYASHITA Hisashi
2002-04-24 16:08                 ` Eli Zaretskii
2002-04-24 16:10                 ` Eli Zaretskii
2002-04-24  7:55           ` MIYASHITA Hisashi
2002-04-24 11:07           ` Eli Zaretskii
2002-04-24 11:05         ` Eli Zaretskii
2002-04-24 10:31           ` MIYASHITA Hisashi
2002-04-24 16:05             ` Eli Zaretskii
2002-04-22  7:03 ` Eli Zaretskii
2002-04-22  6:49   ` Keiichiro Nagano
2002-04-22  8:01     ` Eli Zaretskii
2002-04-22  8:26       ` Keiichiro Nagano
2002-04-22 11:19         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200204242101.g3OL1EE04666@shade.twinsun.com \
    --to=eggert@twinsun.com \
    --cc=emacs-devel@gnu.org \
    --cc=knagano@sodan.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).