[darcs-users] proposal for whitespace annotation in darcs what

David Roundy droundy at abridgegame.org
Fri Apr 1 11:56:43 UTC 2005


On Tue, Mar 29, 2005 at 07:47:03PM +0200, Stefan Rank wrote:
> this is a wishlist thing, but i wanted to ask the list first, maybe 
> there is an easier way which i do not see:
> 
> i'd like to have two options for `darcs whatsnew`:
> 
> - `--shownewlines`: outputs the type of line ending after each hunk line
> - `--showtabsas=<string>`: replaces tabs in the output with <string>

The responses you got were reasonable regarding whatsnews, but contrary to
the other opinions, I do think this is darcs' business.  It's more of an
issue when you're running record and you get a

$ darcs record 
hunk ./ColourPrinter.lhs 58
-
+ 
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help: 

I always then have to wonder whether this patch adds or removes
indentation.  True, I could look up the file to see what it does, but that
seems a bit silly, and if I were doing a pull (and using 'v' to see the
changes), that wouldn't even be an option.

However, I think I'd prefer a bit simpler markup using color.  If you are
outputting without color (e.g. to a pipe) you can always use one of the
techniques suggested by Schwern et al.  So I'd prefer something like a blue
'.' for a space and perhaps a few blue '_'s for a tab... I'm not sure about
how I'd really want to do this.  I'd lean towards hard-coding the mapping,
and perhaps determining whether to do the mapping or not based on an
environment variable.

If you like this idea, it would be great if you could file a wishlist bug
(sending an email to bugs at darcs.net will do it), since I'm a bit swamped
right now and won't have time to implement this myself.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list