[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13521: `sort-lines' on the empty region
From: |
Eli Zaretskii |
Subject: |
bug#13521: `sort-lines' on the empty region |
Date: |
Fri, 21 Aug 2020 10:36:42 +0300 |
> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 21 Aug 2020 00:15:31 -0700
> Cc: monnier@iro.umontreal.ca, xfq.free@gmail.com, rgm@gnu.org,
> 13521@debbugs.gnu.org
>
> > 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.
>
> Sorry, the correct terminology I should have used is "active region".
> This is as tested by `use-region-p'. Compare the test I introduce also
> to the one in `flush-lines', where I lifted it from.
So if the user has transient-mark-mode disabled (which is what I do),
the command will always sort the entire buffer? Or did I
misunderstand something?