the screenshot was from Smultron. The problem is attached, when I
copy & paste from Mail to Smultron/jedit/Terminal and try to
compile, I get the following error warnings (see Pict.2), when I
changed the tabs/spaces like in the third picture it works. It is
annoying to change every line manually...

I think I found the example you gave: it seems to be from a ppost by
James Bailey, Aug. 30 2008.

I did not have any problems when selecting the code in Mail 3.5,
copying, and making a file of it in Terminal using 'cat > file.y'
<return> paste <ctrl>-D, and the compiling using lilypond 2.12.1.

So it may have to do with the editor you are using.
Have you tried using the 'cat' method?
Hans