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


Message #61 received at 13521 <at> debbugs.gnu.org (full text, mbox):

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: RE: bug#13521: `sort-lines' on the empty region
Date: Sat, 5 Sep 2020 08:46:14 -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.
> 
> You expected them to narrow the buffer.  That takes additional
> commands.

I do expect that, for `flush-lines', which is what I
was thinking of.  You correctly pointed out that
`sort-lines' is different.

> > 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).
> 
> So maybe flush-lines needs a separate solution, or none at all.  This
> bug is about sort-lines, so flush-lines is a tangent.

I didn't introduce `flush-lines' into the thread.
But yes, the subject line says `sort-lines', and
`flush-lines' is a very different case.

> > 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.
> 
> That's not really relevant here.  We are talking about commands which
> by virtue of their 'interactive' spec work on the region.  Such
> commands shouldn't depend on the region being active.

Yes, if this is only about commands like `sort-lines'.
Introducing `flush-lines' here was apparently a mistake,
which muddied the waters.

> > 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.
> 
> The proposed change would have made it behave differently, which is
> why I've pointed that out.

Good.  Agreed.




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.