* rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) @ 2010-01-13 9:06 Thien-Thi Nguyen 2010-01-13 10:53 ` Ludovic Courtès ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Thien-Thi Nguyen @ 2010-01-13 9:06 UTC (permalink / raw) To: guile-devel The above form lives in my Emacs init flow, causing trailing whitespace to be deleted on `save-buffer' (C-x C-s). For many projects (but not Guile) this DTRT, because trailing whitespace is not tolerated. Jim Meyering gives a nice rationale in <http://old.nabble.com/whitespace-cleanup-td6828228.html>. I propose Guile also not tolerate trailing whitespace. What do people think? thi ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 9:06 rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) Thien-Thi Nguyen @ 2010-01-13 10:53 ` Ludovic Courtès 2010-01-13 14:22 ` Thien-Thi Nguyen 2010-01-21 20:31 ` Neil Jerram 2010-01-13 20:02 ` Andy Wingo 2010-01-21 20:46 ` Neil Jerram 2 siblings, 2 replies; 13+ messages in thread From: Ludovic Courtès @ 2010-01-13 10:53 UTC (permalink / raw) To: guile-devel Hi, Thien-Thi Nguyen <ttn@gnuvola.org> writes: > The above form lives in my Emacs init flow, causing trailing whitespace to be > deleted on `save-buffer' (C-x C-s). For many projects (but not Guile) this > DTRT, because trailing whitespace is not tolerated. Jim Meyering gives a > nice rationale in <http://old.nabble.com/whitespace-cleanup-td6828228.html>. > > I propose Guile also not tolerate trailing whitespace. What do people think? I agree, but adding such a hook would cause many gratuitous diffs, which then blur VCS history (using ‘git blame’ becomes almost useless). 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? Thanks, Ludo’. [0] http://debbugs.gnu.org/db/53/5312.html ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 10:53 ` Ludovic Courtès @ 2010-01-13 14:22 ` Thien-Thi Nguyen 2010-01-21 20:31 ` Neil Jerram 1 sibling, 0 replies; 13+ messages in thread From: Thien-Thi Nguyen @ 2010-01-13 14:22 UTC (permalink / raw) To: guile-devel () ludo@gnu.org (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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 10:53 ` Ludovic Courtès 2010-01-13 14:22 ` Thien-Thi Nguyen @ 2010-01-21 20:31 ` Neil Jerram 2010-01-21 20:44 ` Ludovic Courtès 1 sibling, 1 reply; 13+ messages in thread From: Neil Jerram @ 2010-01-21 20:31 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guile-devel ludo@gnu.org (Ludovic Courtès) writes: > (using ‘git blame’ becomes almost useless). Wouldn't `git blame -w' solve that problem? Neil ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-21 20:31 ` Neil Jerram @ 2010-01-21 20:44 ` Ludovic Courtès 0 siblings, 0 replies; 13+ messages in thread From: Ludovic Courtès @ 2010-01-21 20:44 UTC (permalink / raw) To: Neil Jerram; +Cc: guile-devel Hi, Neil Jerram <neil@ossau.uklinux.net> writes: > ludo@gnu.org (Ludovic Courtès) writes: > >> (using ‘git blame’ becomes almost useless). > > Wouldn't `git blame -w' solve that problem? Hmm, possibly, yes (I didn’t know this option). Thanks, Ludo’. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 9:06 rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) Thien-Thi Nguyen 2010-01-13 10:53 ` Ludovic Courtès @ 2010-01-13 20:02 ` Andy Wingo 2010-01-13 20:45 ` Thien-Thi Nguyen 2010-01-21 20:46 ` Neil Jerram 2 siblings, 1 reply; 13+ messages in thread From: Andy Wingo @ 2010-01-13 20:02 UTC (permalink / raw) To: Thien-Thi Nguyen; +Cc: guile-devel On Wed 13 Jan 2010 10:06, Thien-Thi Nguyen <ttn@gnuvola.org> writes: > I propose Guile also not tolerate trailing whitespace. What do people > think? To change all that code is a bit of a pain, for not very much gain. I personally don't care about the topic. I would be happier if my use of Emacs didn't leave me often with trailing whitespace. But such as it is, I don't want to play manual garbage collector for stray spaces, which have no detriment on code. Andy -- http://wingolog.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 20:02 ` Andy Wingo @ 2010-01-13 20:45 ` Thien-Thi Nguyen 2010-01-14 0:10 ` Ludovic Courtès 0 siblings, 1 reply; 13+ messages in thread From: Thien-Thi Nguyen @ 2010-01-13 20:45 UTC (permalink / raw) To: guile-devel () Andy Wingo <wingo@pobox.com> () Wed, 13 Jan 2010 21:02:03 +0100 I would be happier if my use of Emacs didn't leave me often with trailing whitespace. See subject line. But such as it is, I don't want to play manual garbage collector for stray spaces, which have no detriment on code. Well, if there's concensus, i'm happy to do the janitorial duties. thi ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 20:45 ` Thien-Thi Nguyen @ 2010-01-14 0:10 ` Ludovic Courtès 0 siblings, 0 replies; 13+ messages in thread From: Ludovic Courtès @ 2010-01-14 0:10 UTC (permalink / raw) To: guile-devel Hi, Thien-Thi Nguyen <ttn@gnuvola.org> writes: > Well, if there's concensus, i'm happy to do the janitorial duties. IMO the cons (blurring VCS history) outweighs the pros. But please (setq show-trailing-whitespace t). Thanks, Ludo’. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-13 9:06 rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) Thien-Thi Nguyen 2010-01-13 10:53 ` Ludovic Courtès 2010-01-13 20:02 ` Andy Wingo @ 2010-01-21 20:46 ` Neil Jerram 2010-01-23 0:38 ` Thien-Thi Nguyen 2 siblings, 1 reply; 13+ messages in thread From: Neil Jerram @ 2010-01-21 20:46 UTC (permalink / raw) To: Thien-Thi Nguyen; +Cc: guile-devel Thien-Thi Nguyen <ttn@gnuvola.org> writes: > The above form lives in my Emacs init flow, causing trailing whitespace to be > deleted on `save-buffer' (C-x C-s). For many projects (but not Guile) this > DTRT, because trailing whitespace is not tolerated. Jim Meyering gives a > nice rationale in <http://old.nabble.com/whitespace-cleanup-td6828228.html>. I'm afraid those rationales don't persuade me: >> - trailing blanks can change the semantics of your code That's what tests are for. >> - these differences can lead to unnecessary merge conflicts Hasn't been a problem in practice AFAIK. I've been doing a lot of merging at work recently, with a lot of real merge conflicts. The few that are caused by whitespace are easy to spot, and give me a pleasant interlude between the ones that are really difficult. >> - some people use editors that automatically convert / +\t/ >> sequences to just TABs (this is relevant not just for leading >> indentation, but also for e.g., regular expressions, where >> it's easy to write a e.g. "[ ]" (space-TAB) as part of a >> grep or sed pattern. Of course, if you're using a modern >> enough tool, you can avoid the problem by using "\t". This >> is why it is better to write the above as "[ ]" (TAB-space). I can't see why this has to do with _trailing_ whitespace, and it seems obvious to me that those editors are just broken. >> - some packages (coreutils :-) have a "make distcheck" rule that will >> fail if it finds any such offending sequence in its sources. We don't have that. > I propose Guile also not tolerate trailing whitespace. What do people think? If you are concerned that your hook is going to generate diffs that other developers might think are spurious - I'd say don't worry about that. I personally won't object to that, and I don't think Andy or Ludo would either. If you anticipate some other practical problem, can you say more about what it is? Thanks, Neil ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-21 20:46 ` Neil Jerram @ 2010-01-23 0:38 ` Thien-Thi Nguyen 2010-01-23 16:10 ` Ludovic Courtès 0 siblings, 1 reply; 13+ messages in thread From: Thien-Thi Nguyen @ 2010-01-23 0:38 UTC (permalink / raw) To: guile-devel () Neil Jerram <neil@ossau.uklinux.net> () Thu, 21 Jan 2010 20:46:26 +0000 > Jim Meyering gives a nice rationale in > <http://old.nabble.com/whitespace-cleanup-td6828228.html>. I'm afraid those rationales don't persuade me: [...] Well, i respect the work Jim Meyering does and read his rationale w/ a more general mindset. I agree Guile is not GNU coreutils, and have elided the "does not apply" parts, w/ the exception of: > [merge conflicts] Hasn't been a problem in practice AFAIK. I've been doing a lot of merging at work recently, with a lot of real merge conflicts. The few that are caused by whitespace are easy to spot, and give me a pleasant interlude between the ones that are really difficult. If there is a whitespace policy, we can eliminate those conflicts (by rejecting non-compliant patches). This is good! If you are concerned that your hook is going to generate diffs that other developers might think are spurious - I'd say don't worry about that. I personally won't object to that, and I don't think Andy or Ludo would either. I would rather clarify the policy (either way) and then adopt it, than go w/o policy. If the policy (either way) is clear, i know how to avoid introducing spurious diffs and being inconvenienced by them from others, and can help others do the same. If you anticipate some other practical problem, can you say more about what it is? The practical problem is that w/o policy spurious diffs come and go, instead of being addressed once (one-shot big-commit if policy is "deny", a blurb in HACKING to justly orient newbies if "allow"). This is "practical" in the sense of "what people will do in practice". It is a "problem" in the sense of "i hate burning my geezer brain-cells on administrivia over and over and over...". Revised proposal: Let's decide one way or the other, record the decision (including link to this thread), and bask in the time and effort saved by our forward thinking when the issue resurfaces w/ new programmers. thi ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-23 0:38 ` Thien-Thi Nguyen @ 2010-01-23 16:10 ` Ludovic Courtès 2010-02-09 13:30 ` Thien-Thi Nguyen 0 siblings, 1 reply; 13+ messages in thread From: Ludovic Courtès @ 2010-01-23 16:10 UTC (permalink / raw) To: guile-devel Hi, Thien-Thi Nguyen <ttn@gnuvola.org> writes: > Revised proposal: Let's decide one way or the other, To me it’s clear: status quo, i.e., no ‘whitespace-cleanup’ or similar all around, but encourage people not to leave trailing whitespace. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-01-23 16:10 ` Ludovic Courtès @ 2010-02-09 13:30 ` Thien-Thi Nguyen 2010-02-14 14:20 ` Ludovic Courtès 0 siblings, 1 reply; 13+ messages in thread From: Thien-Thi Nguyen @ 2010-02-09 13:30 UTC (permalink / raw) To: guile-devel [-- Attachment #1: Type: text/plain, Size: 320 bytes --] () ludo@gnu.org (Ludovic Courtès) () Sat, 23 Jan 2010 17:10:50 +0100 To me it’s clear: status quo, i.e., no ‘whitespace-cleanup’ or similar all around, but encourage people not to leave trailing whitespace. OK, thanks for the clarification. Please find attached a patch to HACKING. thi [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Document-trailing-whitespace-policy.patch --] [-- Type: text/x-diff, Size: 1377 bytes --] From 893dfb5d11e6d2ae6ff56492741711ec368257a4 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen <ttn@gnuvola.org> Date: Tue, 9 Feb 2010 14:29:36 +0100 Subject: [PATCH] Document trailing whitespace policy. * HACKING (Coding standards): Delete trailing whitespace. Add blurb documenting trailing whitespace policy. Signed-off-by: Thien-Thi Nguyen <ttn@gnuvola.org> --- HACKING | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/HACKING b/HACKING index ffe04a8..7463fe5 100644 --- a/HACKING +++ b/HACKING @@ -230,7 +230,7 @@ When deprecating a definition, always follow this procedure: - Write commit messages for functions written in C using the functions' C names, and write entries for functions written in Scheme -using the functions' Scheme names. For example, +using the functions' Scheme names. For example, * foo.c: Moved scm_procedure_documentation from eval.c. @@ -278,6 +278,9 @@ the list of years in the copyright notice at the top of the file. - When you get bug reports or patches from people, be sure to list them in THANKS. +- Do not introduce trailing whitespace (and feel free to clean it up +opportunistically, that is, if doing so is part of some other change). +The goal is to reduce (and over time, eliminate) spurious diffs. Naming conventions ================================================= -- 1.6.3.2 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) 2010-02-09 13:30 ` Thien-Thi Nguyen @ 2010-02-14 14:20 ` Ludovic Courtès 0 siblings, 0 replies; 13+ messages in thread From: Ludovic Courtès @ 2010-02-14 14:20 UTC (permalink / raw) To: guile-devel Hi, Thien-Thi Nguyen <ttn@gnuvola.org> writes: > () ludo@gnu.org (Ludovic Courtès) > () Sat, 23 Jan 2010 17:10:50 +0100 > > To me it’s clear: status quo, i.e., no ‘whitespace-cleanup’ > or similar all around, but encourage people not to leave > trailing whitespace. > > OK, thanks for the clarification. > Please find attached a patch to HACKING. Committed, thanks. Ludo’. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-02-14 14:20 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-13 9:06 rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) Thien-Thi Nguyen 2010-01-13 10:53 ` Ludovic Courtès 2010-01-13 14:22 ` Thien-Thi Nguyen 2010-01-21 20:31 ` Neil Jerram 2010-01-21 20:44 ` Ludovic Courtès 2010-01-13 20:02 ` Andy Wingo 2010-01-13 20:45 ` Thien-Thi Nguyen 2010-01-14 0:10 ` Ludovic Courtès 2010-01-21 20:46 ` Neil Jerram 2010-01-23 0:38 ` Thien-Thi Nguyen 2010-01-23 16:10 ` Ludovic Courtès 2010-02-09 13:30 ` Thien-Thi Nguyen 2010-02-14 14:20 ` Ludovic Courtès
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).