From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to get rid of annoying ^M lineendings Date: Wed, 23 Apr 2008 07:59:19 +0300 Message-ID: References: <227a76ea-99a0-44cd-bb5f-e6c7b328e347@e67g2000hsa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1208926853 3046 80.91.229.12 (23 Apr 2008 05:00:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2008 05:00:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 23 07:01:27 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JoX6h-00016z-VP for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Apr 2008 07:01:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoX62-0001ol-Au for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Apr 2008 01:00:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JoX5k-0001oS-Jo for help-gnu-emacs@gnu.org; Wed, 23 Apr 2008 01:00:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JoX5i-0001nA-8G for help-gnu-emacs@gnu.org; Wed, 23 Apr 2008 01:00:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoX5h-0001mz-Nw for help-gnu-emacs@gnu.org; Wed, 23 Apr 2008 01:00:21 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JoX5h-00051d-DO for help-gnu-emacs@gnu.org; Wed, 23 Apr 2008 01:00:21 -0400 Original-Received: from HOME-C4E4A596F7 ([83.130.1.82]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0JZR00LFFIIGTS77@i_mtaout5.012.net.il> for help-gnu-emacs@gnu.org; Wed, 23 Apr 2008 08:13:34 +0300 (IDT) In-reply-to: <227a76ea-99a0-44cd-bb5f-e6c7b328e347@e67g2000hsa.googlegroups.com> X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53494 Archived-At: > From: olgo > Date: Tue, 22 Apr 2008 06:50:49 -0700 (PDT) > > I keep reading solutions to this problem by means of substituting the > line endings with a global replace but this is not what I need. > I need for the files to be kept as they are, with all kinds of line > endings, but I don't want to see it in the editor. > > Thus, my question is: > Is there a way to tell emacs not to show the ^M character altogether? This should happen automatically, unless you have a file with inconsistent lineendings: some with ^M, others without. Typing "C-x RET c dos RET" immediately before "C-x C-f" that you use to visit the file will cause Emacs to not display any ^M characters, even if the lineendings are inconsistent, but if you edit that file and save it, Emacs will add a ^M character to each line when it saves the file, which might not be what you want in this case. IOW, Emacs cannot remember whether there should be a ^M character on a line by line basis, only for the whole file.