Subject: Re: get-file-buffer and find-buffer-visiting

From: Richard Stallman <[email-masked]>
Date: Wed, 27 Aug 1997 21:54:34 -0400

Since DOS_NT is case insensitive, does it make sense to change
    get-file-buffer to ignore case?

I think so, if there is no other difficulty.

---

From: Eli Zaretskii <[email-masked]>
Date: Thu, 28 Aug 1997 12:24:51 +0300 (IDT)

On Wed, 27 Aug 1997, Geoff Voelker wrote:

> I have a question about get-file-buffer and find-buffer-visiting.  A
> user has encountered a situation where get-file-buffer is invoked in
> different situations with the same filename, except that the filename
> differs in case in the different situations.  get-file-buffer only
> returns the associated buffer for the situation where the case
> matches, and find-buffer-visiting returns the buffer independent of
> case.
> 

Similar problems had popped up before.  My impression from the
discussions back there is that it boils down to this: should we
consider file names which only differ in the letter-case as the *same*
file name, or *different* names that refer to the same file?

Emacs currently supports the former interpretation.  get-file-buffer
is documented to require exact match of the file name, and
find-buffer-visiting is documented to test for other buffers that
might visit the same file, perhaps under different names.

If we want to interpret file names case-insensitively, I would suggest
introducing a special function for filename comparison that on DOS_NT
(and VMS?) will be case-insensitive, and change all the places where
file names are compared with string-equal to use this new function
instead.  Places which use string-match will then need to ignore case
as well.

I'm afraid such a change would be a lot of work.  However, changing a
single function to ignore the case will make Emacs inconsistent in its
treatment of file names on DOS_NT.  If we think Emacs should be
case-insensitive on DOS_NT, it should do that consistently.

---

From: "Richard M. Stallman" <[email-masked]>
Date: Thu, 28 Aug 1997 17:08:22 -0400

I'm afraid such a change would be a lot of work.  However, changing a
    single function to ignore the case will make Emacs inconsistent in its
    treatment of file names on DOS_NT.

This convinces me that no change should be made now
in this aspect of Emacs.

Thanks.