Subject: Re: DOS (text) mode

From: David Aspinall <[email-masked]>
Date: Wed, 22 Jan 1997 12:20:18 +0000

> I'm unfamiliar with format-alist; what support is missing?

format-alist:  "List of information about understood file formats."

I think it was added to deal with enriched mode where text properties
are saved to the file.

I don't know much about it --- I just read the doc string.  From that
it seems as if it might cope nicely with DOS text files, if a regular
expression could be used to match the start of a file.  (If not,
perhaps format-alist could be extended to use a regexp or a function
argument).  Then it will automatically call hooks to encode and decode
the buffer.

I don't think this would add anything new to existing mechanisms
(whether the built-in handling of binary files, or the "DOS" minor
mode), but since Emacs now provides a hook for decoding different file
formats it might seem wise to integrate with it?

After discussions on the list about various DOS translation ideas I
thought I should mention this variable.

Personally I dislike the current mechanism: I would rather that files
were handled in "binary" mode by default, and only in DOS-text mode if
they can be deduced to be in DOS-text mode when visited.  (Perhaps
some file extensions should trigger DOS-text mode, but I am not
convinced).  There should be an easy way to switch to DOS-text mode,
just as with enriched mode.  I think this would be a nice behaviour
for those of us that use mixed text-formats; for people who use only
DOS-text, perhaps there could be a variable to enable the current
DOS-loving behaviour.

 - David.