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: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: xfq.free <at> gmail.com, rgm <at> gnu.org, stefan <at> marxist.se, monnier <at> iro.umontreal.ca, 13521 <at> debbugs.gnu.org
Subject: bug#13521: `sort-lines' on the empty region
Date: Sat, 5 Sep 2020 08:22:58 -0700 (PDT)
> > I doubt that someone who has `transient-mark-mode' off
> > would ever want commands such as `flush-lines' and
> > `sort-lines' to act on the region.  And if they did, I
> > expect they'd just narrow to it.
> 
> Please don't doubt, and please don't impose unnecessary commands on
> users who have transient-mark-mode off.

Please don't claim that I imposed any commands on anyone.

The region is nearly always present and usually nonempty.
A user with `transient-mark-mode' off would typically
(IMHO) be bothered if `flush-lines' started always acting
on the region (it would be almost always: whenever there's
a mark in the buffer and the region is nonempty). 

Do you disagree?

> > Anything that works on "the active region" is something
> > that makes sense only when `transient-mark-mode' is on
> > (IMHO).
> 
> The important point here is that sort-lines worked on the region, even
> if inactive, before the proposed changes, so restricting it now only
> to active regions would be a backward-incompatible change of behavior.

Yes, sorry; I agree about `sort-lines'.  That is not
the case for `flush-lines' and `keep-lines'.

And I think "the important point here" is that a command
that behaves differently when the region is active should
NOT act on the region when `transient-mark-mode' is off.
Why?  Because the notion of "active region" applies only
when `transient-mark-mode' is on.  Any special behavior
provided only when the region is active is, well, only
for when the region is active.  And that's never the case
when `transient-mark-mode' is on.

This was not the case for `sort-lines', as you point out.
It did NOT, and does not, behave differently when the
region is active from when it is inactive.




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.