Re: ^M problem

[email protected] Fri, 4 Nov 2005 11:52:15 -0500
Newsgroups gmane.emacs.xemacs.general
Message-ID <OF7AFAA742.9179E57E-ON852570AF.005B5590-852570AF.005CACED@iqfinancial.com>
1. ---------------

^M is most likely because you have a file that is a DOS/Windows file, but
is being treated as a Unix file.

In a Unix file, end of line is marked by a simple line-feed (^J or x'0A');
in Windows, it is marked by carriage-return, line-feed (^M^J or x'0D0A').
If you treat a DOS file as a UNIX file, the 0A is processed as a line
terminator, and the 0D becomes simply another character, and is displayed
as a ^M.

If that is not the case, the next probablility is that there is something
strange about your input file, for example, two ^M's in a row (x'0D0D') or
a ^M without a preceding ^J,, possibly introduced by a program creating the
file or using a different editor that handles line termination in a
different way.

I would dearly like to know of a way of forcing UNIX or DOS mode, but I
don't think there is.

I have found it useful to track down the cause of the ^M presentation by
bisecting the file and reloading:
Delete the bottom half of the file.
Save the top half.
Reload the top half.
Still see the problem? Then it's here in the top half.
Don't see the problem? Then it's in the bottom half.

Repeat until you find the problem.

2. ---------------

Perhaps I am overcomplicating things, because I have no idea what ecb is.
Is it possible that there is something equivalent to the shell hook
feature: comint-strip-ctrl-m? That should be described in the ecb doc.
(possibly at the top of ecb.el?).

HIH.





                                                                                                                                                     
                      "Shyamsundar,                                                                                                                  
                      Purkayastha                To:       "'[email protected]'" <[email protected]>                                       
                      (Purkayastha)** CTR        cc:                                                                                                 
                      **"                        Subject:  ^M problem                                                                                
                      <shyamsundar@lucent                                                                                                            
                      .com>                                                                                                                          
                      Sent by:                                                                                                                       
                      xemacs-news-bounces                                                                                                            
                      @xemacs.org                                                                                                                    
                                                                                                                                                     
                                                                                                                                                     
                      11/04/2005 09:38 AM                                                                                                            
                                                                                                                                                     
                                                                                                                                                     




Hi to all

I am using xemacs v 21.4 with ecb 1.93
Whenever i activate ecb to view some c++ code files i get a display which
is
full of ^M after every line end.I guess it is the newline which is getting
printed as ^M. I have tried opening those files in other text editors like
kwrite gedit but i dnt get this problem there.

I tried toggling some display options in xemacs but in vein

can anybody help me in this regard

thanks & regards

Shyamsundar Purkayastha
Lucent Technologies O
Wind Tunnel Road,Golf View Homes, Murgesh Palya
Bangalore  560017
India

Ph - +91-80-25052334
Email - [email protected]
www.lucent.com