* After cvs, emacs does not encode file correctly as dos
@ 2002-09-10 13:41 Mark Mynsted
2002-09-10 13:49 ` Kai Großjohann
0 siblings, 1 reply; 7+ messages in thread
From: Mark Mynsted @ 2002-09-10 13:41 UTC (permalink / raw)
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
Has anybody seen this behavior? What is wrong? Is this a CVS
problem, an Emacs problem, other? How should I correct or mitigate
this problem?
--
-MM
I rarely read email from this address /"\
because of spam. \ / ASCII Ribbon Campaign
I MAY see it if you put #NOTSPAM# X Against HTML Mail
in the subject line. / \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: After cvs, emacs does not encode file correctly as dos
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
0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2002-09-10 13:49 UTC (permalink / raw)
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
What happens when you visit it normally, without C-x RET c?
Note that CVS might frob line endings.
kai
--
A large number of young women don't trust men with beards. (BFBS Radio)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: After cvs, emacs does not encode file correctly as dos
2002-09-10 13:49 ` Kai Großjohann
@ 2002-09-16 13:07 ` Mark Mynsted
2002-09-16 13:54 ` Kai Großjohann
0 siblings, 1 reply; 7+ messages in thread
From: Mark Mynsted @ 2002-09-16 13:07 UTC (permalink / raw)
>>>>> "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. If I query the current coding
system, via M-x describe-current-coding-system I get:
- -- undecided-unix
Kai> Note that CVS might frob line endings.
Is that what is happening? Is there something I can do?
--
-MM
I rarely read email from this address /"\
because of spam. \ / ASCII Ribbon Campaign
I MAY see it if you put #NOTSPAM# X Against HTML Mail
in the subject line. / \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: After cvs, emacs does not encode file correctly as dos
2002-09-16 13:07 ` Mark Mynsted
@ 2002-09-16 13:54 ` Kai Großjohann
2002-09-17 12:44 ` Mark Mynsted
0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2002-09-16 13:54 UTC (permalink / raw)
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: After cvs, emacs does not encode file correctly as dos
2002-09-16 13:54 ` Kai Großjohann
@ 2002-09-17 12:44 ` Mark Mynsted
2002-09-17 13:17 ` Stefan Monnier <foo@acm.com>
0 siblings, 1 reply; 7+ messages in thread
From: Mark Mynsted @ 2002-09-17 12:44 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
>>
Kai> What happens when you visit it normally, without C-x RET c?
>>
>> The file is filled with ^M characters.
Kai> I think you mean that C-x RET c first will give you a file which
Kai> looks normally. Omitting the C-x RET c will give you a file which
Kai> contains ^M at the end of the lines.
Yes, it is exactly as you stated.
Kai> I think that's because most lines end with ^M but not all of them
Kai> do. Can you look carefully whether really all lines end with
Kai> ^M?
You are correct. I had a line in my cvs controlled file, that
contained the cvs key word $Log$. That key word was automatically
substituted with the cvs log for that file during the normal course
using cvs to manage the file. Part of that "log" section, supplied by
cvs, did not contain a ^M character at the end of the line.
Kai> Emacs does not assume DOS line endings unless all of them are DOS
Kai> line endings.
:-D
I removed the offending log and now my file looks normal while
omitting the C-x RET c! Thank you very much!
--
-MM
I rarely read email from this address /"\
because of spam. \ / ASCII Ribbon Campaign
I MAY see it if you put #NOTSPAM# X Against HTML Mail
in the subject line. / \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: After cvs, emacs does not encode file correctly as dos
2002-09-17 12:44 ` Mark Mynsted
@ 2002-09-17 13:17 ` Stefan Monnier <foo@acm.com>
2002-09-18 12:46 ` Mark Mynsted
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-09-17 13:17 UTC (permalink / raw)
> You are correct. I had a line in my cvs controlled file, that
> contained the cvs key word $Log$. That key word was automatically
> substituted with the cvs log for that file during the normal course
> using cvs to manage the file. Part of that "log" section, supplied by
> cvs, did not contain a ^M character at the end of the line.
You might want to check gnu.cvs.help to see why it happened and how
to make sure it won't happen again.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: After cvs, emacs does not encode file correctly as dos
2002-09-17 13:17 ` Stefan Monnier <foo@acm.com>
@ 2002-09-18 12:46 ` Mark Mynsted
0 siblings, 0 replies; 7+ messages in thread
From: Mark Mynsted @ 2002-09-18 12:46 UTC (permalink / raw)
>>>>> ""Stefan" == "Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:
>> You are correct. I had a line in my cvs controlled file, that
>> contained the cvs key word $Log$. That key word was automatically
>> substituted with the cvs log for that file during the normal course
>> using cvs to manage the file. Part of that "log" section, supplied by
>> cvs, did not contain a ^M character at the end of the line.
"Stefan> You might want to check gnu.cvs.help to see why it happened and how
"Stefan> to make sure it won't happen again.
It is not available from my news server, but perhaps I could use
google groups or something to check gnu.cvs.help... Thank you.
--
-MM
I rarely read email from this address /"\
because of spam. \ / ASCII Ribbon Campaign
I MAY see it if you put #NOTSPAM# X Against HTML Mail
in the subject line. / \
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-09-18 12:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2002-09-17 12:44 ` Mark Mynsted
2002-09-17 13:17 ` Stefan Monnier <foo@acm.com>
2002-09-18 12:46 ` Mark Mynsted
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.