* Opening typescript file in DOS mode?
@ 2005-03-13 14:50 Roy Smith
2005-03-14 21:26 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Roy Smith @ 2005-03-13 14:50 UTC (permalink / raw)
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Opening typescript file in DOS mode?
2005-03-13 14:50 Opening typescript file in DOS mode? Roy Smith
@ 2005-03-14 21:26 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2005-03-14 21:26 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-14 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-13 14:50 Opening typescript file in DOS mode? Roy Smith
2005-03-14 21:26 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.