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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: SK Kim <tttuuu888 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: suggestion of improvement for sort-numeric-fields function.
Date: Wed, 13 Jun 2018 01:09:17 +0900
[Message part 1 (text/plain, inline)]
This is not likely a bug but sort-numeric-fields function does not allow
region with blank lines, while sort-lines does.

This was because sort-skip-fields occurs error with blank line. And when I
added condition for sort-skip-fields like below, sort-numeric-fields was
working with blank lines too.

                     (when (not (string-match-p "^\\s-*$" (thing-at-point
'line)))
                       (sort-skip-fields field))

So, I just hope sort-numeric-fields would work for region with blank lines
too.

I tested with GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.18.9) of 2018-05-29


Always appreciate for contribution.
Thanks.
[Message part 2 (text/html, inline)]

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.