[asdf-devel] How about a tabs versus spaces policy for asdf?
I would just be tickled to death if we were to ban tab characters from asdf code (I'm convinced by jwz's argument, and I've been harmed enough times by Windows-versus-others tab issues), but I'd be ok with keeping them. Do we have a consensus on tabs-versus-spaces? Cheerio, r
I would just be tickled to death if we were to ban tab characters from asdf code (I'm convinced by jwz's argument, and I've been harmed enough times by Windows-versus-others tab issues), but I'd be ok with keeping them.
Do we have a consensus on tabs-versus-spaces?
For general prefix indentation purposes, I prefer tabs. Something about the semantics of "indent" versus the fixed-width-font-specific "4 or 8 spaces" allows the end viewer to easily change indentation to fit their display device. The normative indentation rules for C/Java languages support tabs rather nicely (with few cases where spaces would be preferred). Expecting tabs to line up with other characters is evil. (corollary) Mixing tabs and spaces is evil. Lisp code is traditionally indented at non-even spacings, with the explicit expectation of alignment. Thus I think spaces-only is the current best practice for lisp. In an ideal world, the editor would take care of all display formatting, and whitespace would only be used for tokenization... - Daniel
I should actually have been specific about something else: If we prefer spaces to tabs (and I will not attempt to stack my eloquence and vituperation against jwz's), we should probably stick the git-equivalent of a pre-commit-hook into the repo to refuse to accept tabs. Daniel --- is your git fu strong enough for this task? r
2009/12/2 Robert Goldman <rpgoldman@sift.info>:
I should actually have been specific about something else:
If we prefer spaces to tabs (and I will not attempt to stack my eloquence and vituperation against jwz's), we should probably stick the git-equivalent of a pre-commit-hook into the repo to refuse to accept tabs.
Daniel --- is your git fu strong enough for this task?
In either case, git-fu is nice. And if git-fu there be, can we also eliminate trailing whitespace? [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] A cuddle a day keeps the shrink away
On Wed, 2 Dec 2009, Faré wrote:
2009/12/2 Robert Goldman <rpgoldman@sift.info>:
I should actually have been specific about something else:
If we prefer spaces to tabs (and I will not attempt to stack my eloquence and vituperation against jwz's), we should probably stick the git-equivalent of a pre-commit-hook into the repo to refuse to accept tabs.
Daniel --- is your git fu strong enough for this task?
It could be. This would require putting the proper hooks/pre-commit file in a .git directory. Should it check all files in the project, or only lisp sources?
In either case, git-fu is nice. And if git-fu there be, can we also eliminate trailing whitespace?
See core.whitespace in the git-config manpage; by default git warns about trailing whitespace. Commands that apply patches (e.g. git-apply and git-am) have an option to control this; --whitespace=error or --whitespace=fix might be what you want. This choice can be made permanent by something like # git config apply.whitespace error Also look at the gitattributes manpage. - Daniel
Daniel Herring <dherring@tentpost.com> writes:
On Wed, 2 Dec 2009, Faré wrote:
2009/12/2 Robert Goldman <rpgoldman@sift.info>:
I should actually have been specific about something else:
If we prefer spaces to tabs (and I will not attempt to stack my eloquence and vituperation against jwz's), we should probably stick the git-equivalent of a pre-commit-hook into the repo to refuse to accept tabs.
Daniel --- is your git fu strong enough for this task?
It could be. This would require putting the proper hooks/pre-commit file in a .git directory. Should it check all files in the project, or only lisp sources?
In either case, git-fu is nice. And if git-fu there be, can we also eliminate trailing whitespace?
See core.whitespace in the git-config manpage; by default git warns about trailing whitespace. Commands that apply patches (e.g. git-apply and git-am) have an option to control this; --whitespace=error or --whitespace=fix might be what you want. This choice can be made permanent by something like # git config apply.whitespace error
Also look at the gitattributes manpage.
- Daniel_______________________________________________ asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
I can recommend to put the following into your .emacs (add-hook 'lisp-mode-hook #'(lambda () (setq whitespace-style 'color) (setq whitespace-chars '(trailing indentation)) (whitespace-mode 1))) and Emacs will colorize offending places. -T.
"Tobias C. Rittweiler" writes:
I can recommend to put the following into your .emacs
(add-hook 'lisp-mode-hook #'(lambda () (setq whitespace-style 'color) (setq whitespace-chars '(trailing indentation)) (whitespace-mode 1)))
and Emacs will colorize offending places.
-T.
Sorry this should have been (setq whitespace-chars '(trailing tabs)), I was bitten by outdated documentation on the intertubes. -T.
Tobias C. Rittweiler wrote:
"Tobias C. Rittweiler" writes:
I can recommend to put the following into your .emacs
(add-hook 'lisp-mode-hook #'(lambda () (setq whitespace-style 'color) (setq whitespace-chars '(trailing indentation)) (whitespace-mode 1)))
and Emacs will colorize offending places.
-T.
Sorry this should have been (setq whitespace-chars '(trailing tabs)), I was bitten by outdated documentation on the intertubes.
JWZ has a recipe for a save-hook in emacs that will untabify for you: http://www.jwz.org/doc/tabs-vs-spaces.html Best, r
Only .lisp and .asd sounds sufficient to me, but Gary wrote a lot of shell scripts I haven't really looked at. I don't have a strong opinion about the documentation source (perhaps surprisingly). Best, R On Dec 2, 2009, at 20:54, Daniel Herring <dherring@tentpost.com> wrote:
On Wed, 2 Dec 2009, Faré wrote:
2009/12/2 Robert Goldman <rpgoldman@sift.info>:
I should actually have been specific about something else:
If we prefer spaces to tabs (and I will not attempt to stack my eloquence and vituperation against jwz's), we should probably stick the git-equivalent of a pre-commit-hook into the repo to refuse to accept tabs.
Daniel --- is your git fu strong enough for this task?
It could be. This would require putting the proper hooks/pre-commit file in a .git directory. Should it check all files in the project, or only lisp sources?
In either case, git-fu is nice. And if git-fu there be, can we also eliminate trailing whitespace?
See core.whitespace in the git-config manpage; by default git warns about trailing whitespace. Commands that apply patches (e.g. git- apply and git-am) have an option to control this; --whitespace=error or --whitespace=fix might be what you want. This choice can be made permanent by something like # git config apply.whitespace error
Also look at the gitattributes manpage.
- Daniel _______________________________________________ asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
I'd like such a filter applied to each and every text file, currently excluding only the *.ico and *.png. [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Ever stop thinking and forget to start again? 2009/12/3 Robert P. Goldman <rpgoldman@sift.info>:
Only .lisp and .asd sounds sufficient to me, but Gary wrote a lot of shell scripts I haven't really looked at. I don't have a strong opinion about the documentation source (perhaps surprisingly). Best, R
On Dec 2, 2009, at 20:54, Daniel Herring <dherring@tentpost.com> wrote:
On Wed, 2 Dec 2009, Faré wrote:
2009/12/2 Robert Goldman <rpgoldman@sift.info>:
I should actually have been specific about something else:
If we prefer spaces to tabs (and I will not attempt to stack my eloquence and vituperation against jwz's), we should probably stick the git-equivalent of a pre-commit-hook into the repo to refuse to accept tabs.
Daniel --- is your git fu strong enough for this task?
It could be. This would require putting the proper hooks/pre-commit file in a .git directory. Should it check all files in the project, or only lisp sources?
In either case, git-fu is nice. And if git-fu there be, can we also eliminate trailing whitespace?
See core.whitespace in the git-config manpage; by default git warns about trailing whitespace. Commands that apply patches (e.g. git- apply and git-am) have an option to control this; --whitespace=error or --whitespace=fix might be what you want. This choice can be made permanent by something like # git config apply.whitespace error
Also look at the gitattributes manpage.
- Daniel
IMO ASDF should be untabified, and there should be no trailing whitespace. Cheers, -- Nikodemus
So... is anyone against my committing a release that just untabifies all our Lisp files? Speak up now, or remain silent forever. On the other hand, if there's no way to enforce it, then it will constantly diverge, so the policy becomes annoying. [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] "Transported to a surreal landscape, a young girl kills the first woman she meets and then teams up with three complete strangers to kill again." - TV listing for the Wizard of Oz in the Marin Independent Journal
participants (3)
-
Daniel Herring
-
dherring@tentpost.com
-
Faré
-
Nikodemus Siivola
-
Robert Goldman
-
Robert P. Goldman
-
Tobias C. Rittweiler