bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19896: 23.1; reverse-region is slow compared to sort-columns


From: asparagus
Subject: bug#19896: 23.1; reverse-region is slow compared to sort-columns
Date: Wed, 18 Feb 2015 17:35:42 +0000 (UTC)

The emacs manual recommends 'M-x reverse-region' as a companion to 'M-x 
sort-columns' to achieve a descending-order column sort.  However, for large 
regions (>100k lines), 'M-x reverse-region' is noticeably slower than 'M-x 
sort-columns', making descending sort much slower than ascending sort.

A workaround on linux: use 'C-u M-x shell-command-on-region' with tac (the 
opposite of cat) instead of using 'M-x reverse-region'.

FROM THE MANUAL:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Sorting.html
M-x reverse-region
    Reverse the order of the lines in the region. This is useful for sorting 
into descending order by fields or columns, since those sort commands do not 
have a feature for doing that.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]