[Python-Dev] Proposal to revert r54204 (splitext change)

"Martin v. Löwis" martin at v.loewis.de
Fri Mar 16 00:45:12 CET 2007

Mike Krell schrieb:
> Here is a point of confusion.  Bear in mind I'm running this under
> windows, so explorer happily reports that ".emacs" has a type of
> "emacs".  (In windows, file types are registered in the system based
> on the extension -- all the characters following the last dot.

Is it really that Emacs registered .emacs as an extension on Windows?
(I see you answer that below)
I would be surprised - I'd rather expect that the Emacs authors
*don't* consider .emacs to be a file with an empty filename and
a .emacs extension. They also (alternatively) support a directory
called .emacs.d for startup files, and I would be equally surprised
if they registered .d as extension (about the only extension Emacs
might register is .el/.elc).

The reason the file is called .emacs on Windows is *not* because
it should have that extension, but because it is called .emacs
on Unix, and it is called that way because the Unix shell and ls
suppress dotfiles unless explicitly asked to display them.

> I often sort files in the explorer based on type, and I want a file
> and all its backups to appear next to each other in such a sorted
> list.  That's exactly why I rename the files the way I do.
> Thus, ".1.emacs" is what I want, and ".emacs.1" is a markedly inferior
> and unacceptable alternative.  That's what I'm referring to by
> extension preservation.

Ok, I see why that would break. What do you do with files that really
have no extension whatsoever (i.e. no dot at all)?


More information about the Python-Dev mailing list