unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: After cvs, emacs does not encode file correctly as dos
Date: Mon, 16 Sep 2002 15:54:48 +0200	[thread overview]
Message-ID: <vafelbu6nvb.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: m21y7unkux.fsf@mmynsted.corp.vha.com

Mark Mynsted <mmynsted_news@gbronline.com> writes:

>>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
>
>  Kai> Mark Mynsted <mmynsted_news@gbronline.com> writes:
>  >> I have a file called notes.txt.  It has DOS style line endings etc.
>  >> It is stored under linux.  When I view it from Emacs all was well,
>  >> i.e. Emacs correctly identified it as a DOS file and used the dos
>  >> encoding when visiting the file.  (I need the file to have the dos
>  >> line endings, etc.)  I next started to manage the file using CVS.  Now
>  >> the only way I can get Emacs to visit the file and display the line
>  >> endings, etc, correctly is to:
>  >> 
>  >> C-x <RET>c dos<RET>C-x C-f ~/doc/notes.txt 
>
>  Kai> What happens when you visit it normally, without C-x RET c?
>
> The file is filled with ^M characters.

I think you mean that C-x RET c first will give you a file which
looks normally.  Omitting the C-x RET c will give you a file which
contains ^M at the end of the lines.

I think that's because most lines end with ^M but not all of them
do.  Can you look carefully whether really all lines end with ^M?

Emacs does not assume DOS line endings unless all of them are DOS
line endings.

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)

  reply	other threads:[~2002-09-16 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-10 13:41 After cvs, emacs does not encode file correctly as dos Mark Mynsted
2002-09-10 13:49 ` Kai Großjohann
2002-09-16 13:07   ` Mark Mynsted
2002-09-16 13:54     ` Kai Großjohann [this message]
2002-09-17 12:44       ` Mark Mynsted
2002-09-17 13:17         ` Stefan Monnier <foo@acm.com>
2002-09-18 12:46           ` Mark Mynsted

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vafelbu6nvb.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).