[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setting eol-type for new files
From: |
Stephen Gildea |
Subject: |
setting eol-type for new files |
Date: |
Sun, 24 Sep 2000 18:39:14 EDT |
I run Emacs 20.7 in a mixed environment where there are Windows/NT and
Unix machines accessing NT and Unix file systems. I would like Emacs
running on NT to write new files on a Unix file system with the Unix
end-of-line convention. I also want my default coding system to be
Latin 1; many of my files contain accented letters.
Existing files work great: Emacs automatically detects the eol type
in the file and sets its coding to match.
Non-existing files could be made to work by adding the Unix drives to
file-name-buffer-file-type-alist or by using add-untranslated-filesystem
on them. But declaring a file to be binary or untranslated inhibits
turning on Latin 1 conversion, so it's not a solution here.
For existing files, find-operation-coding-system nicely provides a
hook I can use by calling modify-coding-system-alist. [and just when
you thought this message was going to end without a bug report...]
I wonder: is it a bug that find-operation-coding-system does not get
called when visiting a new file? It would seem more consistent and
more useful if it were always called.
So that's the list of what I've tried already. What am I missing?
Ideally, I would find a clear and simple way to specify default
character codings and eol types (independently) for existing and new
files (independently) according to file name.
< Stephen
- setting eol-type for new files,
Stephen Gildea <=