From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Opening typescript file in DOS mode? Date: Mon, 14 Mar 2005 14:26:51 -0700 Message-ID: <39mdstF638otdU2@individual.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110836704 1529 80.91.229.2 (14 Mar 2005 21:45:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2005 21:45:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 14 22:45:03 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DAxAV-0000J8-UO for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2005 22:32:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAxQG-0007dD-95 for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2005 16:48:24 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-X-Trace: individual.net IOw4II4Qif3WscTQyzpMKgGMRRfiOarQD3FDHOOIDdWkLyqyM= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:129274 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:24826 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24826 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