help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening typescript file in DOS mode?


From: Kevin Rodgers
Subject: Re: Opening typescript file in DOS mode?
Date: Mon, 14 Mar 2005 14:26:51 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Roy Smith wrote:
> On unix, files normally have newlines as line terminators. But, if you run
> the "script" command, you end up with CR-NL pairs, because it's grabbing
> the raw terminal output.
>
> If I open the resulting typescript file in emacs, I see all the ^M's at the
> ends of lines (not fatal, but annoying).  Emacs will automatically open
> CR-NL files in DOS mode, but the first line ("Script started on Sun Mar 13 > 08:59:06 2005") only has the raw newline, which seems to make emacs think
> it's a normal unix text file.
>
> I can force emacs to open the file in DOS mode interactively (C-X RET c dos
> RET C-X C-F typescript RET), but that's a pain.  Is there any way to get
> emacs to read past the first line when deciding which mode to open the file
> with?

,----[ C-h v auto-coding-regexp-alist RET ]
| auto-coding-regexp-alist's value is
| (("^BABYL OPTIONS:[      ]*-\\*-[        ]*rmail[        ]*-\\*-" . 
no-conversion))
|
|
| Documentation:
| Alist of patterns vs corresponding coding systems.
| Each element looks like (REGEXP . CODING-SYSTEM).
| A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.
|
| The settings in this alist take priority over `coding:' tags
| in the file (see the function `set-auto-coding')
| and the contents of `file-coding-system-alist'.
|
| You can customize this variable.
|
| Defined in `international/mule'.
`----

--
Kevin Rodgers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]