Info Node: (lispref.info)Files and MS-DOS

lispref.info: Files and MS-DOS
Files
Format Conversion
Back to Software Index
Files and MS-DOS
================
Emacs on MS-DOS makes a distinction between text files and binary
files. This is necessary because ordinary text files on MS-DOS use a
two character sequence between lines: carriage-return and linefeed
(CRLF). Emacs expects just a newline character (a linefeed) between
lines. When Emacs reads or writes a text file on MS-DOS, it needs to
convert the line separators. This means it needs to know which files
are text files and which are binary. It makes this decision when
visiting a file, and records the decision in the variable
`buffer-file-type' for use when the file is saved.
Note: MS-DOS Subprocesses, for a related feature for subprocesses.
- Variable: buffer-file-type
This variable, automatically local in each buffer, records the
file type of the buffer's visited file. The value is `nil' for
text, `t' for binary.
- Function: find-buffer-file-type FILENAME
This function determines whether file FILENAME is a text file or a
binary file. It returns `nil' for text, `t' for binary.
- User Option: file-name-buffer-file-type-alist
This variable holds an alist for distinguishing text files from
binary files. Each element has the form (REGEXP . TYPE), where
REGEXP is matched against the file name, and TYPE may be is `nil'
for text, `t' for binary, or a function to call to compute which.
If it is a function, then it is called with a single argument (the
file name) and should return `t' or `nil'.
- User Option: default-buffer-file-type
This variable specifies the default file type for files whose names
don't indicate anything in particular. Its value should be `nil'
for text, or `t' for binary.
- Command: find-file-text FILENAME
Like `find-file', but treat the file as text regardless of its
name.
- Command: find-file-binary FILENAME
Like `find-file', but treat the file as binary regardless of its
name.
automatically generated by info2www version 1.2