GNU bug report logs - #31800
suggestion of improvement for sort-numeric-fields function.

Previous Next

Package: emacs;

Reported by: SK Kim <tttuuu888 <at> gmail.com>

Date: Tue, 12 Jun 2018 16:10:01 UTC

Severity: wishlist

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 31800 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: SK Kim <tttuuu888 <at> gmail.com>, 31800 <at> debbugs.gnu.org
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
Date: Thu, 23 Jan 2020 15:50:12 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>>> -		     (sort-skip-fields field)
>>> +                     (unless (string-match-p "^\\s-*$" (thing-at-point 'line))
>>> +                       (sort-skip-fields field))
>
> I don't think this patch makes sense as is -- I think that's a
> convoluted way of saying `looking-at'?  But it makes conceptual sense, I
> think.

I'm not sure.  Do you mean to use:

    (looking-at "\\s*$")

Are we sure point is at the beginning of line here though?  The above
code doesn't require that, but also seems to be wrong if region is in
the middle of a line.  But I'm not sure how people typically use this
in that case.

BTW, shouldn't we also fix the same bug in sort-fields while we're at
it?

Best regards,
Stefan Kangas




This bug report was last modified 3 years and 164 days ago.

Previous Next


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