GNU bug report logs - #13521
`sort-lines' on the empty region

Previous Next

Package: emacs;

Reported by: Xue Fuqiao <xfq.free <at> gmail.com>

Date: Tue, 22 Jan 2013 00:56:01 UTC

Severity: wishlist

Tags: patch, wontfix

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: xfq.free <at> gmail.com, rgm <at> gnu.org, monnier <at> iro.umontreal.ca, 13521 <at> debbugs.gnu.org
Subject: bug#13521: `sort-lines' on the empty region
Date: Fri, 21 Aug 2020 09:22:35 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 20 Aug 2020 18:18:34 -0700
> Cc: Xue Fuqiao <xfq.free <at> gmail.com>, Glenn Morris <rgm <at> gnu.org>,
>  13521 <at> debbugs.gnu.org
> 
> > I personally prefer the "whole buffer", but whoever makes the change
> > gets to make the choice.
> 
> The attached patch makes 'sort-lines' sort the entire buffer when there
> is no region.

How frequently did you see a buffer in Emacs with no region in it?
IME, it takes about 2 commands since buffer creation to have a region
in it.  So I predict users to be tripped by this feature quite a lot:
they will think there's no region, invoke the command, and get some
arbitrary region sorted.  Requiring them to always provide the region
avoids this pitfall, since the user is forced to make sure the region
is where he or she wants it.  And marking the whole buffer is just 2
key-presses away.

So I think this change will annoy more than help.




This bug report was last modified 4 years and 9 days ago.

Previous Next


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