[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace)
From: |
Thien-Thi Nguyen |
Subject: |
Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) |
Date: |
Wed, 13 Jan 2010 15:22:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
() address@hidden (Ludovic Courtès)
() Wed, 13 Jan 2010 11:53:01 +0100
I agree, but adding such a hook would cause many gratuitous
diffs, which then blur VCS history (using ‘git blame’ becomes
almost useless).
Usually, once a project decides to use some whitespace policy,
there is a one-time change-only-whitespace commit after which
programmers are expected to adhere to the new policy (using
whatever tools they choose). This way, the pain from gratuitous
diffs are minimized.
Another way to minimize pain is to instruct the diff program to
ignore whitespace (this means in practice `--ignore-space-change'
(-b) or `--ignore-space-at-eol' for "git diff").
Having said that, i see (count of affected lines by file below)
that even a one-time change will touch a lot of lines. Hmmm.
Instead, I’d suggest using ‘show-trailing-whitespace’.
Unfortunately, that can’t be a per-file or per-directory local
variable [0] so we can just kindly ask people to add it to
their ‘.emacs’. :-)
What do you think?
I'd rather a clean break than relying on the chance that the
source will be opportunistically cleaned up going forward.
thi
____________________________________________________
$ git grep -c -H -e \[\ \ \]\$ \
| sed '/:0$/d;s/\(.*\):\(.*\)$/\2 \1/' \
| sort -nr
1395 gc-benchmarks/larceny/twobit-input-short.sch
1395 gc-benchmarks/larceny/nucleic2.sch
861 gc-benchmarks/larceny/twobit.sch
861 gc-benchmarks/larceny/twobit-input-long.sch
628 gc-benchmarks/larceny/twobit-smaller.sch
309 libguile/ChangeLog-1996-1999
278 doc/r5rs/r5rs.texi
201 module/language/ecmascript/parse-lalr.scm
129 module/sxml/upstream/SSAX.scm
113 test-suite/tests/numbers.test
106 libguile/numbers.c
83 doc/ref/srfi-modules.texi
81 libguile/filesys.c
78 test-suite/tests/srfi-1.test
59 doc/texinfo.tex
57 test-suite/tests/sxml.xpath.test
57 module/sxml/upstream/SXPath-old.scm
51 libguile/ports.c
50 gc-benchmarks/larceny/sboyer.sch
48 test-suite/tests/srfi-14.test
48 gc-benchmarks/larceny/nboyer.sch
43 module/srfi/srfi-18.scm
43 module/ice-9/format.scm
41 module/oop/goops.scm
41 libguile/posix.c
40 libguile/print.c
39 libguile/deprecated.c
39 doc/ref/api-modules.texi
34 libguile/strings.c
33 module/language/tree-il.scm
33 doc/ref/goops-tutorial.texi
32 test-suite/tests/srfi-18.test
32 libguile/win32-socket.c
32 NEWS
31 gc-benchmarks/larceny/dynamic.sch
29 doc/oldfmt.c
28 benchmark-suite/benchmarks/srfi-13.bm
27 module/ice-9/boot-9.scm
27 libguile/struct.c
26 module/language/tree-il/analyze.scm
26 libguile/arrays.c
26 guile-readline/readline.c
25 test-suite/tests/list.test
25 libguile/srfi-4.h
25 libguile/srfi-13.c
25 doc/ref/ChangeLog-guile-doc-ref
24 test-suite/tests/syntax.test
24 module/ice-9/calling.scm
24 libguile/hashtab.c
24 libguile/gsubr.c
24 doc/ref/api-data.texi
23 libguile/vm-i-system.c
23 libguile/load.c
22 test-suite/tests/r5rs_pitfall.test
22 gc-benchmarks/larceny/gcbench.sch
22 doc/ref/vm.texi
22 doc/ref/data-rep.texi
21 module/language/tree-il/compile-glil.scm
20 libguile/unidata_to_charset.pl
20 libguile/read.c
20 libguile/guile-snarf.awk.in
20 libguile/eval.c
20 libguile/bitvectors.c
20 gc-benchmarks/gcbench.scm
20 doc/sources/env.texi
19 test-suite/tests/popen.test
19 module/texinfo/string-utils.scm
19 module/ice-9/ChangeLog-2008
19 libguile/random.c
19 libguile/i18n.c
19 libguile/ChangeLog-scm
19 ChangeLog-2008
18 test-suite/tests/hash.test
17 test-suite/tests/sxml.transform.test
17 module/oop/goops/describe.scm
17 module/ice-9/safe-r5rs.scm
17 libguile/socket.c
16 test-suite/tests/posix.test
16 module/texinfo.scm
16 module/ice-9/eval.scm
16 libguile/list.c
16 libguile/array-map.c
15 test-suite/tests/strings.test
15 module/ice-9/psyntax.scm
15 libguile/strports.c
15 libguile/script.c
15 libguile/ioext.c
15 doc/ref/hierarchy.eps
15 doc/mbapi.texi
15 doc/maint/guile.texi
14 libguile/stacks.c
14 libguile/programs.c
14 libguile/net_db.c
14 libguile/memoize.c
14 libguile/fports.c
14 doc/sources/old-intro.texi
14 doc/ref/scheme.pdf
14 doc/ref/gds.pdf
14 doc/ref/api-compound.texi
13 test-suite/tests/texinfo.test
13 test-suite/tests/texinfo.serialize.test
13 test-suite/tests/srfi-4.test
13 test-suite/tests/encoding-iso88597.test
13 test-suite/tests/alist.test
13 libguile/vectors.c
13 libguile/symbols.c
13 libguile/hash.c
13 libguile/generalized-arrays.c
13 libguile/chars.c
13 libguile/ChangeLog-2000
13 configure.ac
12 test-suite/tests/regexp.test
12 test-suite/tests/poe.test
12 module/sxml/xpath.scm
12 module/language/tree-il/primitives.scm
12 module/ice-9/r4rs.scm
12 libguile/sort.c
12 gc-benchmarks/larceny/perm.sch
11 test-suite/tests/texinfo.docbook.test
11 test-suite/tests/sxml.fold.test
11 test-suite/standalone/test-conversion.c
11 module/sxml/upstream/input-parse.scm
11 module/sxml/transform.scm
11 module/statprof.scm
11 module/language/glil/compile-assembly.scm
11 libguile/throw.c
11 libguile/smob.c
11 libguile/hooks.c
11 libguile/dynl.c
11 libguile/backtrace.c
11 doc/ref/hierarchy.pdf
10 test-suite/tests/sxml.ssax.test
10 test-suite/tests/srfi-6.test
10 test-suite/tests/ports.test
10 srfi/srfi-1.c
10 srfi/ChangeLog-2008
10 module/texinfo/reflection.scm
10 module/ice-9/null.scm
10 libguile/vports.c
10 libguile/fluids.c
10 libguile/continuations.c
9 test-suite/tests/common-list.test
9 module/sxml/simple.scm
9 module/sxml/apply-templates.scm
9 libguile/weaks.c
9 libguile/vm.c
9 doc/sources/scheme-concepts.texi
9 doc/ref/posix.texi
9 doc/ref/libguile-smobs.texi
8 test-suite/tests/encoding-escapes.test
8 module/texinfo/html.scm
8 module/system/vm/debug.scm
8 module/language/ecmascript/compile-tree-il.scm
8 module/ice-9/popen.scm
8 module/ice-9/networking.scm
8 libguile/win32-dirent.c
8 doc/ref/compiler.texi
7 test-suite/tests/weaks.test
7 test-suite/tests/srfi-13.test
7 test-suite/tests/r4rs.test
7 test-suite/tests/encoding-utf8.test
7 test-suite/tests/chars.test
7 module/texinfo/docbook.scm
7 module/oop/goops/util.scm
7 module/ice-9/test.scm
7 module/ice-9/poe.scm
7 module/ice-9/lineio.scm
7 libguile/win32-uname.c
7 libguile/srfi-14.c
7 libguile/procs.c
7 libguile/ports.h
7 libguile/macros.c
7 libguile/guile-snarf.in
7 libguile/gen-scmconfig.c
7 libguile/gc.c
7 libguile/c-tokenize.lex
7 libguile/bytevectors.c
7 doc/ref/scheme-ideas.texi
7 doc/ref/api.txt
6 test-suite/tests/tree-il.test
6 test-suite/tests/symbols.test
6 test-suite/tests/srcprop.test
6 test-suite/tests/hooks.test
6 test-suite/tests/asm-to-bytecode.test
6 module/texinfo/plain-text.scm
6 module/system/vm/inspect.scm
6 module/system/repl/repl.scm
6 module/sxml/upstream/SXML-tree-trans.scm
6 module/sxml/ssax.scm
6 module/oop/goops/composite-slot.scm
6 module/language/tree-il/inline.scm
6 module/ice-9/string-fun.scm
6 module/ice-9/rdelim.scm
6 libguile/version.c
6 libguile/variable.c
6 libguile/uniform.c
6 libguile/simpos.c
6 libguile/rdelim.c
6 libguile/promises.c
6 libguile/init.c
6 libguile/goops.c
6 libguile/debug.c
6 libguile/async.c
6 libguile/ChangeLog-threads
6 guile-readline/ice-9/readline.scm
6 examples/box-dynamic/box.c
6 doc/guile.1
5 test-suite/tests/vectors.test
5 test-suite/tests/texinfo.string-utils.test
5 test-suite/tests/srfi-9.test
5 test-suite/tests/records.test
5 test-suite/tests/encoding-iso88591.test
5 test-suite/tests/elisp.test
5 test-suite/tests/dynamic-scope.test
5 test-suite/tests/continuations.test
5 test-suite/tests/c-api/strings.c
5 module/texinfo/indexing.scm
5 module/sxml/fold.scm
5 module/oop/goops/active-slot.scm
5 module/language/ecmascript/base.scm
5 module/language/brainfuck/compile-tree-il.scm
5 module/ice-9/r5rs.scm
5 module/ice-9/pretty-print.scm
5 module/ice-9/hcons.scm
5 libguile/srcprop.c
5 libguile/scmsigs.c
5 libguile/root.c
5 libguile/error.c
5 libguile/dynwind.c
5 libguile/discouraged.c
5 libguile/deprecated.h
5 gc-benchmarks/larceny/graphs.sch
5 examples/box/box.c
5 examples/box-module/box.c
5 examples/box-dynamic-module/box.c
5 doc/ref/api-control.texi
4 test-suite/tests/unif.test
4 test-suite/tests/time.test
4 test-suite/tests/srfi-34.test
4 test-suite/tests/signals.test
4 test-suite/tests/q.test
4 test-suite/tests/pairs.test
4 test-suite/tests/optargs.test
4 test-suite/tests/multilingual.nottest
4 test-suite/tests/load.test
4 test-suite/tests/goops.test
4 test-suite/tests/format.test
4 test-suite/tests/filesys.test
4 test-suite/tests/eval.test
4 test-suite/tests/elisp-compiler.test
4 test-suite/tests/c-api.test
4 test-suite/tests/brainfuck.test
4 test-suite/tests/arbiters.test
4 module/texinfo/serialize.scm
4 module/system/repl/command.scm
4 module/sxml/ssax/input-parse.scm
4 module/oop/goops/stklos.scm
4 module/oop/goops/simple.scm
4 module/oop/goops/save.scm
4 module/oop/goops/internal.scm
4 module/oop/goops/compile.scm
4 module/oop/goops/accessors.scm
4 module/oop/ChangeLog-2008
4 module/language/ecmascript/tokenize.scm
4 module/language/ecmascript/parse.scm
4 module/language/ecmascript/impl.scm
4 module/language/assembly/disassemble.scm
4 module/ice-9/weak-vector.scm
4 module/ice-9/syncase.scm
4 module/ice-9/stack-catch.scm
4 module/ice-9/session.scm
4 module/ice-9/safe.scm
4 module/ice-9/rw.scm
4 module/ice-9/posix.scm
4 module/ice-9/mapping.scm
4 module/ice-9/ls.scm
4 module/ice-9/history.scm
4 module/ice-9/emacs.scm
4 module/ice-9/documentation.scm
4 module/ice-9/buffered-input.scm
4 module/ice-9/arrays.scm
4 meta/guile-tools.in
4 meta/guile-config.in
4 libguile/stime.c
4 libguile/srfi-4.c
4 libguile/guile-func-name-check.in
4 libguile/guardians.c
4 libguile/frames.c
4 libguile/boolean.c
4 libguile/arbiters.c
4 libguile/alist.c
4 guile-readline/ChangeLog-2008
4 emacs/gds-scheme.el
4 doc/use-cases.txt
4 doc/sources/unix.texi
4 doc/sources/libguile-tools.texi
4 doc/ref/scheme-debugging.texi
4 doc/ref/preface.texi
4 doc/ref/intro.texi
4 doc/ref/history.texi
4 doc/ref/api-evaluation.texi
4 doc/example-smob/myguile.c
4 doc/example-smob/image-type.c
3 test-suite/tests/version.test
3 test-suite/tests/syncase.test
3 test-suite/tests/structs.test
3 test-suite/tests/streams.test
3 test-suite/tests/statprof.test
3 test-suite/tests/srfi-98.test
3 test-suite/tests/srfi-39.test
3 test-suite/tests/srfi-26.test
3 test-suite/tests/srfi-17.test
3 test-suite/tests/srfi-10.test
3 test-suite/tests/sort.test
3 test-suite/tests/ramap.test
3 test-suite/tests/options.test
3 test-suite/tests/interp.test
3 test-suite/tests/i18n.test
3 test-suite/tests/guardians.test
3 test-suite/tests/gc.test
3 test-suite/tests/compiler.test
3 module/system/base/syntax.scm
3 module/system/base/language.scm
3 module/srfi/srfi-98.scm
3 module/srfi/srfi-11.scm
3 module/srfi/srfi-1.scm
3 module/oop/goops/dispatch.scm
3 module/language/tree-il/optimize.scm
3 module/language/tree-il/fix-letrec.scm
3 module/language/objcode/spec.scm
3 module/language/glil.scm
3 module/language/elisp/compile-tree-il.scm
3 module/language/assembly/decompile-bytecode.scm
3 module/language/assembly/compile-bytecode.scm
3 module/language/assembly.scm
3 module/ice-9/streams.scm
3 module/ice-9/serialize.scm
3 module/ice-9/optargs.scm
3 module/ice-9/occam-channel.scm
3 module/ice-9/gds-server.scm
3 module/ice-9/debugger/command-loop.scm
3 module/ice-9/debug.scm
3 module/ice-9/and-let-star.scm
3 meta/Makefile.am
3 libguile/vm-engine.c
3 libguile/strings.h
3 libguile/stackchk.c
3 libguile/rw.c
3 libguile/procprop.c
3 libguile/private-options.h
3 libguile/pairs.c
3 libguile/options.c
3 libguile/objcodes.c
3 libguile/modules.c
3 libguile/guile-snarf-docs.in
3 libguile/gsubr.h
3 libguile/generalized-vectors.c
3 libguile/frames.h
3 libguile/foreign.c
3 libguile/feature.c
3 libguile/eq.c
3 libguile/conv-integer.i.c
3 libguile/continuations.h
3 libguile/array-handle.h
3 libguile/array-handle.c
3 libguile/Makefile.am
3 guile-readline/readline.h
3 gc-benchmarks/larceny/softscheme.sch
3 gc-benchmarks/larceny/gcold.scm
3 examples/box-dynamic-module/README
3 emacs/patch.el
3 emacs/guile-scheme.el
3 emacs/guile-c.el
3 emacs/gds.el
3 emacs/ChangeLog-2008
3 doc/sources/libguile-overview.texi
3 doc/ref/scheme-using.texi
3 doc/ref/api-memory.texi
3 doc/ref/api-debug.texi
3 benchmark-suite/lib.scm
2 testsuite/the-bug.txt
2 test-suite/tests/threads.test
2 test-suite/tests/srfi-88.test
2 test-suite/tests/srfi-69.test
2 test-suite/tests/srfi-60.test
2 test-suite/tests/srfi-37.test
2 test-suite/tests/srfi-35.test
2 test-suite/tests/srfi-31.test
2 test-suite/tests/srfi-19.test
2 test-suite/tests/srfi-11.test
2 test-suite/tests/socket.test
2 test-suite/tests/receive.test
2 test-suite/tests/r6rs-ports.test
2 test-suite/tests/procprop.test
2 test-suite/tests/modules.test
2 test-suite/tests/keywords.test
2 test-suite/tests/import.test
2 test-suite/tests/getopt-long.test
2 test-suite/tests/ftw.test
2 test-suite/tests/fractions.test
2 test-suite/tests/exceptions.test
2 test-suite/tests/elisp-reader.test
2 test-suite/tests/bytevectors.test
2 test-suite/tests/bit-operations.test
2 test-suite/tests/and-let-star.test
2 test-suite/standalone/test-system-cmds
2 module/system/vm/trace.scm
2 module/system/vm/program.scm
2 module/srfi/srfi-9.scm
2 module/srfi/srfi-8.scm
2 module/srfi/srfi-69.scm
2 module/srfi/srfi-60.scm
2 module/srfi/srfi-6.scm
2 module/srfi/srfi-4/gnu.scm
2 module/srfi/srfi-4.scm
2 module/srfi/srfi-34.scm
2 module/srfi/srfi-31.scm
2 module/srfi/srfi-26.scm
2 module/srfi/srfi-2.scm
2 module/srfi/srfi-19.scm
2 module/srfi/srfi-17.scm
2 module/srfi/srfi-16.scm
2 module/srfi/srfi-14.scm
2 module/srfi/srfi-13.scm
2 module/srfi/srfi-10.scm
2 module/language/value/spec.scm
2 module/language/tree-il/spec.scm
2 module/language/scheme/spec.scm
2 module/language/scheme/decompile-tree-il.scm
2 module/language/scheme/compile-tree-il.scm
2 module/language/objcode.scm
2 module/language/glil/spec.scm
2 module/language/glil/decompile-assembly.scm
2 module/language/elisp/spec.scm
2 module/language/ecmascript/spec.scm
2 module/language/ecmascript/function.scm
2 module/language/ecmascript/array.scm
2 module/language/bytecode/spec.scm
2 module/language/brainfuck/spec.scm
2 module/language/brainfuck/parse.scm
2 module/language/brainfuck/compile-scheme.scm
2 module/language/assembly/spec.scm
2 module/ice-9/time.scm
2 module/ice-9/threads.scm
2 module/ice-9/slib.scm
2 module/ice-9/runq.scm
2 module/ice-9/regex.scm
2 module/ice-9/receive.scm
2 module/ice-9/q.scm
2 module/ice-9/match.scm
2 module/ice-9/list.scm
2 module/ice-9/getopt-long.scm
2 module/ice-9/gap-buffer.scm
2 module/ice-9/ftw.scm
2 module/ice-9/expect.scm
2 module/ice-9/deprecated.scm
2 module/ice-9/debugging/trc.scm
2 module/ice-9/debugging/traps.scm
2 module/ice-9/debugging/trace.scm
2 module/ice-9/debugging/steps.scm
2 module/ice-9/debugging/breakpoints.scm
2 module/ice-9/debugger/trc.scm
2 module/ice-9/debugger/state.scm
2 module/ice-9/debugger/commands.scm
2 module/ice-9/debugger.scm
2 module/ice-9/common-list.scm
2 module/ice-9/channel.scm
2 meta/guile.m4
2 m4/labels-as-values.m4
2 libguile/vm-i-scheme.c
2 libguile/vm-engine.h
2 libguile/uniform.h
2 libguile/trees.c
2 libguile/tags.h
2 libguile/strerror.c
2 libguile/srfi-14.h
2 libguile/private-gc.h
2 libguile/print.h
2 libguile/objprop.c
2 libguile/mallocs.c
2 libguile/keywords.c
2 libguile/guile-doc-snarf.in
2 libguile/gettext.c
2 libguile/gdbint.c
2 libguile/evalext.c
2 libguile/deprecation.c
2 libguile/conv-uinteger.i.c
2 libguile/boolean.h
2 examples/box-dynamic/README
2 emacs/update-changelog.el
2 emacs/ppexpand.el
2 emacs/multistring.el
2 emacs/guile.el
2 emacs/guile-emacs.scm
2 emacs/gud-guile.el
2 emacs/gds-server.el
2 doc/sources/format.texi
2 doc/ref/expect.texi
2 doc/ref/autoconf.texi
2 doc/groupings.alist
1 testsuite/t-values.scm
1 testsuite/t-catch.scm
1 test-suite/standalone/test-unwind.c
1 test-suite/standalone/test-bad-identifiers
1 test-suite/standalone/Makefile.am
1 test-suite/lib.scm
1 test-suite/ChangeLog-2008
1 srfi/srfi-60.c
1 srfi/srfi-4.h
1 srfi/srfi-14.h
1 module/system/vm/frame.scm
1 module/system/base/compile.scm
1 module/srfi/Makefile.am
1 module/language/elisp/runtime/macro-slot.scm
1 module/language/elisp/lexer.scm
1 module/Makefile.am
1 libguile/vm.h
1 libguile/vm-i-loader.c
1 libguile/vm-expand.h
1 libguile/vectors.h
1 libguile/variable.h
1 libguile/values.c
1 libguile/strorder.c
1 libguile/srfi-13.h
1 libguile/regex-posix.c
1 libguile/quicksort.i.c
1 libguile/pthread-threads.h
1 libguile/properties.c
1 libguile/programs.h
1 libguile/numbers.h
1 libguile/null-threads.h
1 libguile/null-threads.c
1 libguile/mkstemp.c
1 libguile/lang.c
1 libguile/instructions.h
1 libguile/instructions.c
1 libguile/hooks.h
1 libguile/guile.c
1 libguile/gdb_interface.h
1 libguile/gc.h
1 libguile/gc-malloc.c
1 libguile/foreign.h
1 libguile/fluids.h
1 libguile/extensions.c
1 libguile/eval.h
1 libguile/discouraged.h
1 libguile/debug-malloc.c
1 libguile/chars.h
1 libguile/bitvectors.h
1 libguile/ChangeLog-2008
1 libguile.h
1 gc-benchmarks/larceny/run-benchmark.chez
1 gc-benchmarks/larceny/earley.sch
1 examples/scripts/simple-hello.scm
1 examples/modules/main
1 examples/modules/README
1 examples/compat/compat.h
1 examples/README
1 examples/Makefile.am
1 examples/ChangeLog-2008
1 emacs/gds-test.el
1 emacs/Makefile.am
1 doc/use-cases.fig
1 doc/tutorial/Makefile.am
1 doc/sources/unix-other.texi
1 doc/sources/jimb-org.texi
1 doc/ref/standard-library.am
1 doc/ref/mod-getopt-long.texi
1 doc/ref/misc-modules.texi
1 doc/ref/hierarchy.png
1 doc/ref/guile.texi
1 doc/ref/goops.texi
1 doc/ref/api-procedures.texi
1 doc/r5rs/Makefile.am
1 doc/example-smob/ChangeLog-2008
1 doc/ChangeLog-guile-doc
1 benchmark-suite/benchmarks/chars.bm
1 benchmark-suite/ChangeLog-2008
1 README.guile-vm
1 HACKING