lilypond-devel
[Top][All Lists]
Advanced

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

Re: GOP2-4 - C++ and scheme indentation (probable decision)


From: Graham Percival
Subject: Re: GOP2-4 - C++ and scheme indentation (probable decision)
Date: Fri, 17 Aug 2012 21:52:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

I'm sorry, but I am quite confused.


On Fri, Aug 17, 2012 at 10:02:19AM +0200, Jan Nieuwenhuizen wrote:
> Anything that can be automated, that otherwise would require manual
> intervention or attention, should be automated.

I definitely agree with this.

> I do not care if the tool is 50MB to install.  I would not care
> if it is 200MB to install.

> If things can be simplified, if dependencies can be dropped, if things
> can be sped-up, even better.

I agree with these.

> Of course, if a similar result can be obtained by a simple tool such as
> astyle, that's perfect.  It's a huge win.  But the argument: we won't
> automate this and will document deviating manual procedures that will
> require all [GNU] hackers to manually jump through these hoops because
> automating it requires a 50MB tool and in theory the tool could be much
> smaller...isn't that just silly?

If I understand this paragraph correctly, then there has been a
large communication problem.  I am not proposing that we document
manual procedures.  Instead, I am proposing that we use automatic
formatting for scheme files.

I see two candidates for such automation:

1. the fix-scheme.sh script that Carl was writing.  This
introduces no additional dependencies.

2. a new fix-scheme-with-emacs.sh script which calls emacs to
format a text file, i.e. something like
  find -name "*.scm" | \
  xargs emacs -batch \
    -l misc/our-emacs-formatting \
    -f our-emacs-format-function

  This second option adds the additional dependency of emacs.


Either option will result in consistent indentation in scheme
files, and furthermore can be easily re-applied every few months
in case people deviate.  (for example, a week ago some C++ files
contained tabs instead of spaces; running our fixcc.py script
fixed that)

Option #1 probably requires something like 1 hour of work before
it is ready.  Option #2 probably requires something like 10
minutes of work by somebody who knows emacs and shell scripts.  I
would be happy with either option.  I would also be happy to adopt
#2 on a temporary basis, while possibly switching to #1 at some
point in the future if we can duplicate emacs formatting with a
standalone script.


If there is tentative agreement with this, then I will re-examine
the proposal carefully to see where the misunderstandings arose
and fix them; then I will re-submit the proposal.

- Graham



reply via email to

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