On Tuesday, June 30, 2015 at 8:24:46 PM UTC+5:30,
to...@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, Jun 30, 2015 at 07:17:39AM -0700, Rusi wrote:
> > I have two somewhat related questions, both around whitespace:
> >
> > 1. Is it possible to have some sort of save-hook so that all leading (indentation) whitespace is cleaned up to space alone and tabs are removed?
>
> I'll leave that to more knowledgeable.
>
> > 2. How to make a dirty crlf file in emacs?
> > By dirty I mean, some lines ending LF (ie Unix) and some ending CRLF (ie DOS)
> > [This is to test that such dirty-files are not add-able into git]
>
> Since CR == 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 :-)
>
> At the end of a line, type CTRL-Q CTRL-M -- voilà, this line has crlf
> at its end. Check either with hexl-mode, or outside Emacs with hexdump -C.