all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* text files use dos coding by default
@ 2004-08-02 14:03 David Ellis
  2004-08-02 18:36 ` Jason Rumney
  0 siblings, 1 reply; 6+ messages in thread
From: David Ellis @ 2004-08-02 14:03 UTC (permalink / raw)


I am using emacs on Windows XP. It seems that text files use unix coding by
default even though the files have carriage return-linefeeds at the ends of
the lines. Is there a way that I can set this up to use dos by default?

Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* text files use dos coding by default
@ 2004-08-02 14:03 David Ellis
  0 siblings, 0 replies; 6+ messages in thread
From: David Ellis @ 2004-08-02 14:03 UTC (permalink / raw)


I am using emacs on Windows XP. It seems that text files use unix coding by
default even though the files have carriage return-linefeeds at the ends of
the lines. Is there a way that I can set this up to use dos by default?

Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: text files use dos coding by default
  2004-08-02 14:03 text files use dos coding by default David Ellis
@ 2004-08-02 18:36 ` Jason Rumney
  2004-08-02 18:57   ` David Ellis
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Rumney @ 2004-08-02 18:36 UTC (permalink / raw)


"David Ellis" <ddellis@mail.com> writes:

> I am using emacs on Windows XP. It seems that text files use unix coding by
> default even though the files have carriage return-linefeeds at the ends of
> the lines. Is there a way that I can set this up to use dos by default?

The default on Windows is to create files with DOS line ends, and to
autodetect line ends when reading existing files. So either you have
something in your init files to make Unix the default, or the files
you are opening have inconsistent line-ends, so Emacs defaults to Unix
to avoid corrupting binary files.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: text files use dos coding by default
  2004-08-02 18:36 ` Jason Rumney
@ 2004-08-02 18:57   ` David Ellis
  2004-08-02 20:05     ` Eli Zaretskii
       [not found]     ` <mailman.2497.1091477526.1960.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: David Ellis @ 2004-08-02 18:57 UTC (permalink / raw)


That's what I thought. I tried this test. I renamed my .emacs file so that I
have no startup file.

If I send a dir listing to a file (dir > test.txt)and open it with emacs,
emacs thinks it is unix.

If I just open emacs and start typing in the scratch buffer, it thinks that
it is dos. But if I save it, exit emacs, and open the file, it thinks it is
unix.

Dave
<jasonr (Jason Rumney) @ f2s.com> wrote in message
news:un01dv12z.fsf@jasonrumney.net...
> "David Ellis" <ddellis@mail.com> writes:
>
> > I am using emacs on Windows XP. It seems that text files use unix coding
by
> > default even though the files have carriage return-linefeeds at the ends
of
> > the lines. Is there a way that I can set this up to use dos by default?
>
> The default on Windows is to create files with DOS line ends, and to
> autodetect line ends when reading existing files. So either you have
> something in your init files to make Unix the default, or the files
> you are opening have inconsistent line-ends, so Emacs defaults to Unix
> to avoid corrupting binary files.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: text files use dos coding by default
  2004-08-02 18:57   ` David Ellis
@ 2004-08-02 20:05     ` Eli Zaretskii
       [not found]     ` <mailman.2497.1091477526.1960.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2004-08-02 20:05 UTC (permalink / raw)


> From: "David Ellis" <ddellis@mail.com>
> Newsgroups: gnu.emacs.help
> Date: Mon, 2 Aug 2004 13:57:41 -0500
> 
> That's what I thought. I tried this test. I renamed my .emacs file so that I
> have no startup file.
> 
> If I send a dir listing to a file (dir > test.txt)and open it with emacs,
> emacs thinks it is unix.
> 
> If I just open emacs and start typing in the scratch buffer, it thinks that
> it is dos. But if I save it, exit emacs, and open the file, it thinks it is
> unix.

What does Emacs display in the echo area if you type "M-x emacs-version"
and then hit RET?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: text files use dos coding by default
       [not found]     ` <mailman.2497.1091477526.1960.help-gnu-emacs@gnu.org>
@ 2004-08-03  1:06       ` David Ellis
  0 siblings, 0 replies; 6+ messages in thread
From: David Ellis @ 2004-08-03  1:06 UTC (permalink / raw)


I downloaded the latest version and reinstalled and it work fine now. Both
the old and new installations were
GNU Emacs 21.3.1 . The old version had the date 2003-11-10. The new one has
2004-03-10.

I'm not sure what was wrong, but all is well now.

Thanks to those who helped.

Dave

"Eli Zaretskii" <eliz@gnu.org> wrote in message
news:mailman.2497.1091477526.1960.help-gnu-emacs@gnu.org...
> > From: "David Ellis" <ddellis@mail.com>
> > Newsgroups: gnu.emacs.help
> > Date: Mon, 2 Aug 2004 13:57:41 -0500
> >
> > That's what I thought. I tried this test. I renamed my .emacs file so
that I
> > have no startup file.
> >
> > If I send a dir listing to a file (dir > test.txt)and open it with
emacs,
> > emacs thinks it is unix.
> >
> > If I just open emacs and start typing in the scratch buffer, it thinks
that
> > it is dos. But if I save it, exit emacs, and open the file, it thinks it
is
> > unix.
>
> What does Emacs display in the echo area if you type "M-x emacs-version
> and then hit RET?
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-08-03  1:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-02 14:03 text files use dos coding by default David Ellis
2004-08-02 18:36 ` Jason Rumney
2004-08-02 18:57   ` David Ellis
2004-08-02 20:05     ` Eli Zaretskii
     [not found]     ` <mailman.2497.1091477526.1960.help-gnu-emacs@gnu.org>
2004-08-03  1:06       ` David Ellis
  -- strict thread matches above, loose matches on Subject: below --
2004-08-02 14:03 David Ellis

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.