GNU bug report logs - #6176
[PATCH 1/2] sort: add a --debug option to highlight key extents

Previous Next

Package: coreutils;

Reported by: Pádraig Brady <P <at> draigBrady.com>

Date: Tue, 11 May 2010 22:59:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 6176-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 6176-done <at> debbugs.gnu.org
Subject: Re: bug#6176: [PATCH 1/2] sort: add a --debug option to highlight
	key extents
Date: Wed, 12 May 2010 12:39:01 +0100
On 12/05/10 12:08, Jim Meyering wrote:
> Pádraig Brady wrote:
>> The attached patch allows one to:
>>
>> $ printf "one 2 3e3e" | .sort --debug -k3,3g -k2,2
>> one 2 3e3e
>>       ___
>>    __
>> __________
> 
> Nice.  Thanks for writing all of that.
> These changes are sure to be useful.
> 
> I have merely glanced through them (look fine so far),
> but would not mind at all if you were to push the series as-is.
> 
> Jim
> 
> PS: I've gone ahead and marked this as "done".

Thanks.

The changes shouldn't be risky as everything
is protected with if (debug).

I was also wondering about informational class
messages that could be output by --debug.
Perhaps stats on the number of comparisons done
could be useful? Also mentioning the oft confusing
collating order with something like:

if (debug)
  {
    if (hard_LC_COLLATE)
      fprintf (stderr, _("# Using %s locale rules\n"),
               quote(setlocale (LC_COLLATE, NULL));
    else
      fprintf (stderr, _("# Using simple byte comparison\n");
  }

Anyway, something for another day.

cheers,
Pádraig.




This bug report was last modified 15 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.