lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indent-ly


From: Bertalan Fodor (LilyPondTool)
Subject: Re: indent-ly
Date: Thu, 22 Oct 2009 10:23:17 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Now, the real problem I see with this approach is that no perfect formatting (which is not the same as indentation) can be done without actually parsing the input. Complete parsing of LilyPond input is _impossible_ without LilyPond itself. For example you need to format LilyPond code _inside_ Scheme code (remember the #{ construct used in define-music-function) So a standard formatting engine can only be written inside LilyPond, or at least using LilyPond to generate metadata describing the structure of the input.

Bert

Martin Tarenskeen wrote:


On Wed, 21 Oct 2009, Graham Percival wrote:

- it would be nice to have an option to replace the file directly instead of
having to copy/paste the resulting file

Definitely!

Done in latest version. Use -m (--modify)
Be careful: This version overwrites the original file without making a backup ( infile.ly~ )first. Maybe I should add that in the next version.


- scheme code is not handled (or indented uniformly)

Yes, scheme code should be formatted in the scheme way.
I know very very little about scheme. Some example lilypond files with much scheme code might help.

- if within brackets there are tabs after the code and before the
end-bracket they are replaced by a bunch of blanks

Hmm, I'm not certain how often this would come into play.
I use tabs sometimes for indenting lines, but I haven't seen anyone using tabs in the middle of a line of lilypond code

- in my programming style i prefer to have the endbracket aligned with the
code above - maybe with an additional option this could be solved!?

I'd argue against this -- the point of a unified style /
indentation scheme is that it's *standard*.
...
I don't think we should have many options at all.
I agree
B
One more item to consider: whitespace at the ends of lines should
be stripped.

I thought I already did that ? I'll look in to it.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]