unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31800: suggestion of improvement for sort-numeric-fields function.
@ 2018-06-12 16:09 SK Kim
  2019-07-13  3:41 ` Lars Ingebrigtsen
  2022-02-03 19:34 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: SK Kim @ 2018-06-12 16:09 UTC (permalink / raw)
  To: 31800

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 895 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-03 19:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 16:09 bug#31800: suggestion of improvement for sort-numeric-fields function SK Kim
2019-07-13  3:41 ` Lars Ingebrigtsen
2019-07-13  8:21   ` SK Kim
2020-01-20 19:55     ` Stefan Kangas
2020-01-22 13:44       ` Lars Ingebrigtsen
2020-01-23 14:50         ` Stefan Kangas
2020-01-24 15:30           ` Lars Ingebrigtsen
2022-02-03 19:34 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).