From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: whitespace issues Date: Tue, 30 Jun 2015 07:57:56 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1435676420 10410 80.91.229.3 (30 Jun 2015 15:00:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jun 2015 15:00:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 30 17:00:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9x1H-00061O-Te for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2015 17:00:20 +0200 Original-Received: from localhost ([::1]:47417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9x1H-0006k6-4W for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2015 11:00:19 -0400 X-Received: by 10.42.226.197 with SMTP id ix5mr27265343icb.10.1435676277450; Tue, 30 Jun 2015 07:57:57 -0700 (PDT) X-Received: by 10.50.253.5 with SMTP id zw5mr287243igc.9.1435676277436; Tue, 30 Jun 2015 07:57:57 -0700 (PDT) Original-Path: usenet.stanford.edu!j8no3359083igd.0!news-out.google.com!t2ni1606igk.0!nntp.google.com!j8no3359079igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.195.57.13; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 117.195.57.13 User-Agent: G2/1.0 Injection-Date: Tue, 30 Jun 2015 14:57:57 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:213032 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105319 Archived-At: On Tuesday, June 30, 2015 at 8:24:46 PM UTC+5:30, to...@tuxteam.de wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On Tue, Jun 30, 2015 at 07:17:39AM -0700, Rusi wrote: > > I have two somewhat related questions, both around whitespace: > >=20 > > 1. Is it possible to have some sort of save-hook so that all leading (i= ndentation) whitespace is cleaned up to space alone and tabs are removed? >=20 > I'll leave that to more knowledgeable. >=20 > > 2. How to make a dirty crlf file in emacs? > > By dirty I mean, some lines ending LF (ie Unix) and some ending CRLF (i= e DOS) > > [This is to test that such dirty-files are not add-able into git] >=20 > Since CR =3D=3D CTLR-M, create a file with a buffer coding system > whatever-nix (e.g. utf8-unix). This is the default on a sensible > operating system anyway :-) >=20 > At the end of a line, type CTRL-Q CTRL-M -- voil=E0, this line has crlf > at its end. Check either with hexl-mode, or outside Emacs with hexdump -C= . Neat! Thanks! [Its 2015 and our version systems cant get this right]